pgsql: Add HEADER support to COPY text format

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add HEADER support to COPY text format
Date: 2022-01-28 08:49:55
Message-ID: E1nDMx9-0000EZ-8o@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)lapeyre(at)lenstra(dot)fr>
Discussion: https://www.postgresql.org/message-id/flat/CAF1-J-0PtCWMeLtswwGV2M70U26n4g33gpe1rcKQqe6wVQDrFA(at)mail(dot)gmail(dot)com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/43f33dc018a4b77ced78a0a6df8ed5d450cfe5f4

Modified Files
--------------
contrib/file_fdw/expected/file_fdw.out | 4 +---
contrib/file_fdw/sql/file_fdw.sql | 1 -
doc/src/sgml/ref/copy.sgml | 2 +-
src/backend/commands/copy.c | 4 ++--
src/backend/commands/copyto.c | 5 ++++-
src/include/commands/copy.h | 2 +-
src/test/regress/expected/copy.out | 8 ++++++++
src/test/regress/sql/copy.sql | 12 ++++++++++++
8 files changed, 29 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2022-01-28 13:41:39 pgsql: Allow server-side compression to be used with -Fp.
Previous Message Peter Eisentraut 2022-01-28 08:21:30 pgsql: Add some const decorations