1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add HEADER support to COPY text format

The COPY CSV format supports the HEADER option to output a header
line.  This patch adds the same option to the default text format.  On
input, the HEADER option causes the first line to be skipped, same as
with CSV.

Author: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Discussion: https://www.postgresql.org/message-id/flat/CAF1-J-0PtCWMeLtswwGV2M70U26n4g33gpe1rcKQqe6wVQDrFA@mail.gmail.com
This commit is contained in:
Peter Eisentraut
2022-01-28 09:22:53 +01:00
parent 5553cbd4fe
commit 43f33dc018
8 changed files with 29 additions and 9 deletions

View File

@ -277,7 +277,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
Specifies that the file contains a header line with the names of each
column in the file. On output, the first line contains the column
names from the table, and on input, the first line is ignored.
This option is allowed only when using <literal>CSV</literal> format.
This option is not allowed when using <literal>binary</literal> format.
</para>
</listitem>
</varlistentry>