file_fdw: Support multi-line HEADER option. Commit bc2f348 introduced multi-line HEADER support for COPY. This commit extends this capability to file_fdw, allowing multiple header lines to be skipped.
Because CREATE/ALTER FOREIGN TABLE requires option values to be single-quoted, this commit also updates defGetCopyHeaderOption() to accept integer values specified as strings for HEADER option. Author: Shinya Kato <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Reviewed-by: songjinzhou <[email protected]> Reviewed-by: Japin Li <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/caozeurt+iwc47vhpms+uj4wszvolpsz2f2_wopm8m7o+cza...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/26cb14aea12a0f0c2f9a49de3865721936b711a7 Modified Files -------------- contrib/file_fdw/data/multiline_header.csv | 4 ++ contrib/file_fdw/expected/file_fdw.out | 29 +++++++++++++- contrib/file_fdw/sql/file_fdw.sql | 13 +++++++ doc/src/sgml/file-fdw.sgml | 4 +- src/backend/commands/copy.c | 62 +++++++++++++++++------------- src/test/regress/expected/copy.out | 18 +++++++++ src/test/regress/expected/copy2.out | 6 +++ src/test/regress/sql/copy.sql | 15 ++++++++ src/test/regress/sql/copy2.sql | 3 ++ 9 files changed, 125 insertions(+), 29 deletions(-)
