pgsql: Support multi-line headers in COPY FROM command.
pgsql: Support multi-line headers in COPY FROM command.
От:
Fujii Masao <fujii@postgresql.org>
Дата:
Support multi-line headers in COPY FROM command. The COPY FROM command now accepts a non-negative integer for the HEADER option, allowing multiple header lines to be skipped. This is useful when the input contains multi-line headers that should be ignored during data import. Author: Shinya Kato Co-authored-by: Fujii Masao Reviewed-by: Yugo Nagata Discussion: https://postgr.es/m/CAOzEurRPxfzbxqeOPF_AGnAUOYf=Wk0we+1LQomPNUNtyZGBZw@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/bc2f348e87c02de63647dbe290d64ff088880dbe Modified Files -------------- doc/src/sgml/ref/copy.sgml | 38 +++++++++++++++++++++++--------- src/backend/commands/copy.c | 42 ++++++++++++++++++++++-------------- src/backend/commands/copyfromparse.c | 17 +++++++++++---- src/backend/commands/copyto.c | 2 +- src/include/commands/copy.h | 16 ++++++-------- src/test/regress/expected/copy.out | 25 ++++++++++++++++++++- src/test/regress/expected/copy2.out | 6 ++++++ src/test/regress/sql/copy.sql | 30 ++++++++++++++++++++++++++ src/test/regress/sql/copy2.sql | 3 +++ src/tools/pgindent/typedefs.list | 1 - 10 files changed, 138 insertions(+), 42 deletions(-)