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

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Ryo Kanbayashi <kanbayashi(dot)dev(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ecpg command does not warn COPY ... FROM STDIN;
Date: 2025-01-08 15:19:37
Message-ID: 332f4469-9f71-4b5a-ae58-1a6ecd150978@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-01-08 15:21:07 Re: improve DEBUG1 logging of parallel workers for CREATE INDEX?
Previous Message Tom Lane 2025-01-08 15:18:25 Re: pg_settings.unit and DefineCustomXXXVariable