File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -3442,6 +3442,7 @@ CopyStmt: COPY opt_binary qualified_name opt_column_list
34423442 ereport (ERROR,
34433443 (errcode(ERRCODE_SYNTAX_ERROR),
34443444 errmsg(" WHERE clause not allowed with COPY TO" ),
3445+ errhint(" Try the COPY (SELECT ... WHERE ...) TO variant." ),
34453446 parser_errposition(@11 )));
34463447
34473448 n->options = NIL;
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ COPY x TO stdout WHERE a = 1;
163163ERROR: WHERE clause not allowed with COPY TO
164164LINE 1: COPY x TO stdout WHERE a = 1;
165165 ^
166+ HINT: Try the COPY (SELECT ... WHERE ...) TO variant.
166167COPY x from stdin WHERE a = 50004;
167168COPY x from stdin WHERE a > 60003;
168169COPY x from stdin WHERE f > 60003;
You can’t perform that action at this time.
0 commit comments