Re: ecpg command does not warn COPY ... FROM STDIN; - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: ecpg command does not warn COPY ... FROM STDIN;
Date
Msg-id 332f4469-9f71-4b5a-ae58-1a6ecd150978@oss.nttdata.com
Whole thread Raw
In response to RE: ecpg command does not warn COPY ... FROM STDIN;  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses Re: ecpg command does not warn COPY ... FROM STDIN;
List pgsql-hackers

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. Before that,
as per my testing, ecpg successfully detected COPY FROM STDIN and reported
a warning. It seems the fix will need to be back-patched to all supported versions.

>> I feel we can change like "COPY FROM STDIN/STDOUT...", or prepare two messages.
>> Thought?
> 
> I think your proposed fix is better too.
> So, I modified the patch.

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.

Regards,

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




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_settings.unit and DefineCustomXXXVariable
Next
From: Bertrand Drouvot
Date:
Subject: Re: improve DEBUG1 logging of parallel workers for CREATE INDEX?