Add HEADER support to COPY text format
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/file_fdw/expected/file_fdw.out | modified | +1 −3 |
| contrib/file_fdw/sql/file_fdw.sql | modified | +0 −1 |
| doc/src/sgml/ref/copy.sgml | modified | +1 −1 |
| src/backend/commands/copy.c | modified | +2 −2 |
| src/backend/commands/copyto.c | modified | +4 −1 |
| src/include/commands/copy.h | modified | +1 −1 |
| src/test/regress/expected/copy.out | modified | +8 −0 |
| src/test/regress/sql/copy.sql | modified | +12 −0 |
Documentation touched
Discussion
- Allow COPY's 'text' format to output a header 88 messages · 2018-05-13 → 2022-06-23