Re: ecpg command does not warn COPY ... FROM STDIN;
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Ryo Kanbayashi <kanbayashi.dev@gmail.com>,
"Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-01-08T15:42:09Z
Lists: pgsql-hackers
Fujii Masao <masao.fujii@oss.nttdata.com> writes: > On 2025/01/08 23:04, Ryo Kanbayashi wrote: > But it is not working. > ecpg command fails to notice though code like above exits on pgc code. > This issue seems to have been introduced in commit 3d009e45bd. Indeed :-( > As for COPY FROM STDOUT, while it's possible, mentioning it might be > confusing since it's not official syntax. So I'm not sure if this is > good idea. There's another problem: the correct syntax is COPY TO STDOUT, and that won't trigger this warning either. I'm inclined to drop the test on @5 altogether, and just check for "stdin" or "stdout" in @7. There is no variant of those that will work. (But maybe we should allow it if opt_program isn't empty?) The warning message could perhaps be written "COPY FROM STDIN/TO STDOUT is not implemented". regards, tom lane
Commits
-
ecpg: Restore detection of unsupported COPY FROM STDIN.
- 226c9048d734 13.19 landed
- d06ab3c0c117 14.16 landed
- 71ef47cf0f20 15.11 landed
- 5c7c34db2511 16.7 landed
- ba2dbedd5396 17.3 landed
- 94b914f601bd 18.0 landed
-
plpgsql: pure parser and reentrant scanner
- 7b27f5fd36cb 18.0 cited
-
Add support for piping COPY to/from an external program.
- 3d009e45bde2 9.3.0 cited