Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03bf0d9

Browse files
committed
Rewrite some regression queries for option checks with COPY
Some queries in copy2 are there to check various option combinations,and used "stdin" or "stdout" incompatible with the COPY TO or FROMclauses combined with them, which was confusing. This commit rewritesthese queries to use a compatible grammar.The coverage of the tests is unchanged. Like the original commit451d116, backpatch down to 16 where these have been introduced. Afollow-up commit will rely on this area of the tests for a bug fix.Author: Joel JacobsonReviewed-by: Zhang MingliDiscussion:https://postgr.es/m/65030d1d-5f90-4fa4-92eb-f5f50389858e@app.fastmail.comBackpatch-through: 16
1 parentc0490b0 commit03bf0d9

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

‎src/test/regress/expected/copy2.out

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,36 +86,36 @@ ERROR: conflicting or redundant options
8686
LINE 1: COPY x from stdin (log_verbosity default, log_verbosity verb...
8787
^
8888
-- incorrect options
89-
COPY xto stdin (format BINARY, delimiter ',');
89+
COPY xfrom stdin (format BINARY, delimiter ',');
9090
ERROR: cannot specify DELIMITER in BINARY mode
91-
COPY xto stdin (format BINARY, null 'x');
91+
COPY xfrom stdin (format BINARY, null 'x');
9292
ERROR: cannot specify NULL in BINARY mode
9393
COPY x from stdin (format BINARY, on_error ignore);
9494
ERROR: only ON_ERROR STOP is allowed in BINARY mode
9595
COPY x from stdin (on_error unsupported);
9696
ERROR: COPY ON_ERROR "unsupported" not recognized
9797
LINE 1: COPY x from stdin (on_error unsupported);
9898
^
99-
COPY xto stdin (format TEXT, force_quote(a));
99+
COPY xfrom stdin (format TEXT, force_quote(a));
100100
ERROR: COPY FORCE_QUOTE requires CSV mode
101101
COPY x from stdin (format CSV, force_quote(a));
102102
ERROR: COPY FORCE_QUOTE cannot be used with COPY FROM
103-
COPY xto stdout (format TEXT, force_not_null(a));
103+
COPY xfrom stdin (format TEXT, force_not_null(a));
104104
ERROR: COPY FORCE_NOT_NULL requires CSV mode
105-
COPY x tostdin (format CSV, force_not_null(a));
105+
COPY x tostdout (format CSV, force_not_null(a));
106106
ERROR: COPY FORCE_NOT_NULL cannot be used with COPY TO
107-
COPY xto stdout (format TEXT, force_null(a));
107+
COPY xfrom stdin (format TEXT, force_null(a));
108108
ERROR: COPY FORCE_NULL requires CSV mode
109-
COPY x tostdin (format CSV, force_null(a));
109+
COPY x tostdout (format CSV, force_null(a));
110110
ERROR: COPY FORCE_NULL cannot be used with COPY TO
111-
COPY x tostdin (format BINARY, on_error unsupported);
111+
COPY x tostdout (format BINARY, on_error unsupported);
112112
ERROR: COPY ON_ERROR cannot be used with COPY TO
113-
LINE 1: COPY x tostdin (format BINARY, on_error unsupported);
114-
^
115-
COPY xto stdout (log_verbosity unsupported);
113+
LINE 1: COPY x tostdout (format BINARY, on_error unsupported);
114+
^
115+
COPY xfrom stdin (log_verbosity unsupported);
116116
ERROR: COPY LOG_VERBOSITY "unsupported" not recognized
117-
LINE 1: COPY xto stdout (log_verbosity unsupported);
118-
^
117+
LINE 1: COPY xfrom stdin (log_verbosity unsupported);
118+
^
119119
COPY x from stdin with (reject_limit 1);
120120
ERROR: COPY REJECT_LIMIT requires ON_ERROR to be set to IGNORE
121121
COPY x from stdin with (on_error ignore, reject_limit 0);

‎src/test/regress/sql/copy2.sql

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ COPY x from stdin (on_error ignore, on_error ignore);
7070
COPY xfrom stdin (log_verbosity default, log_verbosity verbose);
7171

7272
-- incorrect options
73-
COPY xto stdin (format BINARY, delimiter',');
74-
COPY xto stdin (format BINARY,null'x');
73+
COPY xfrom stdin (format BINARY, delimiter',');
74+
COPY xfrom stdin (format BINARY,null'x');
7575
COPY xfrom stdin (format BINARY, on_error ignore);
7676
COPY xfrom stdin (on_error unsupported);
77-
COPY xto stdin (formatTEXT, force_quote(a));
77+
COPY xfrom stdin (formatTEXT, force_quote(a));
7878
COPY xfrom stdin (format CSV, force_quote(a));
79-
COPY xto stdout (formatTEXT, force_not_null(a));
80-
COPY x tostdin (format CSV, force_not_null(a));
81-
COPY xto stdout (formatTEXT, force_null(a));
82-
COPY x tostdin (format CSV, force_null(a));
83-
COPY x tostdin (format BINARY, on_error unsupported);
84-
COPY xto stdout (log_verbosity unsupported);
79+
COPY xfrom stdin (formatTEXT, force_not_null(a));
80+
COPY x tostdout (format CSV, force_not_null(a));
81+
COPY xfrom stdin (formatTEXT, force_null(a));
82+
COPY x tostdout (format CSV, force_null(a));
83+
COPY x tostdout (format BINARY, on_error unsupported);
84+
COPY xfrom stdin (log_verbosity unsupported);
8585
COPY xfrom stdin with (reject_limit1);
8686
COPY xfrom stdin with (on_error ignore, reject_limit0);
8787

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp