mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-23 06:47:14 +08:00
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 <shinya11.kato@gmail.com> Co-authored-by: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Yugo Nagata <nagata@sraoss.co.jp> Discussion: https://postgr.es/m/CAOzEurRPxfzbxqeOPF_AGnAUOYf=Wk0we+1LQomPNUNtyZGBZw@mail.gmail.com
This commit is contained in:
@ -90,6 +90,9 @@ COPY x to stdout (format BINARY, on_error unsupported);
|
||||
COPY x from stdin (log_verbosity unsupported);
|
||||
COPY x from stdin with (reject_limit 1);
|
||||
COPY x from stdin with (on_error ignore, reject_limit 0);
|
||||
COPY x from stdin with (header -1);
|
||||
COPY x from stdin with (header 2.5);
|
||||
COPY x to stdout with (header 2);
|
||||
|
||||
-- too many columns in column list: should fail
|
||||
COPY x (a, b, c, d, e, d, c) from stdin;
|
||||
|
||||
Reference in New Issue
Block a user