1. PostgreSQL 16 Documentation, SQL Commands, COPY:
Section: COPY, "Synopsis" and "Parameters".
Content: The documentation explicitly shows the syntax COPY ... TO ... [ WITH ] ( option [, ...] ). It lists HEADER as an option that "Specifies that the file contains a header line with the names of each column... On output, the first line contains the column names from the table... This option is allowed only when using CSV format." This directly supports option B.
Link: https://www.postgresql.org/docs/current/sql-copy.html
2. PostgreSQL 16 Documentation, Chapter 7. Data Types, 7.4. The COPY Protocol:
Section: 7.4.1. COPY Command
Content: This section provides examples and further details on the COPY command's usage, reinforcing the syntax. It clarifies that COPY ... WITH CSV HEADER is the correct formulation for exporting a CSV with a header row.
Link: https://www.postgresql.org/docs/current/protocol-copy.html (Note: While this discusses the protocol, it references the SQL command syntax).
3. University of California, Berkeley - Data 100 Course Materials:
Source: Principles and Techniques of Data Science, Lecture 10: SQL II.
Content: University courseware on data science frequently covers database interactions. Materials often demonstrate exporting data for analysis. The standard command taught for exporting data from PostgreSQL to a CSV file with headers is COPY table TO 'file.csv' WITH (FORMAT CSV, HEADER); or the shorthand COPY table TO 'file.csv' WITH CSV HEADER;. This aligns with academic instruction.