Re: ecpg command does not warn COPY ... FROM STDIN;

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ryo Kanbayashi <kanbayashi(dot)dev(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ecpg command does not warn COPY ... FROM STDIN;
Date: 2025-01-08 16:04:40
Message-ID: 20e81fe2-cc30-4d15-882f-253f7fa2b2d3@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025/01/09 0:42, Tom Lane wrote:
> Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)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.

ISTM that ecpg supports COPY TO STDOUT and includes the regression test "copystdout" for it. No?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2025-01-08 16:05:18 Re: pgindent exit status if a file encounters an error
Previous Message Fujii Masao 2025-01-08 15:45:48 Re: Enhancing Memory Context Statistics Reporting