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

Ryo Kanbayashi <kanbayashi.dev@gmail.com>

From: Ryo Kanbayashi <kanbayashi.dev@gmail.com>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@oss.nttdata.com>
Date: 2025-01-11T17:04:22Z
Lists: pgsql-hackers

Attachments

> On Thu, Jan 9, 2025 at 9:27 PM Ryo Kanbayashi <kanbayashi.dev@gmail.com> wrote:
>
> > On 2025/01/09 20:34, Ryo Kanbayashi wrote:
> > > Dear Tom, Fujii-san, Kuroda-san,
> > >
> > > I saw comments of yours and recognized that better fix is below.
> > >
> > > - Fix of first attached patch which does not change warning message
> > >
> > > And I created patch entry of commitfest :)
> > > https://commitfest.postgresql.org/52/5497/
> > >
> > > What should I do additionally?
> > > Do I need to write patches for current supporting versions? (12.x - 17.x)
> >
> > Testing the patch across all supported versions would be helpful.
> > If adjustments are needed for specific versions, creating separate
> > patches for those would also be appreciated. Since v12 is no longer
> > supported, back-patching to it isn't necessary.
>
> thanks.
> I try these :)
>
> > BTW, regarding the discussion on the list, please avoid top-posting;
> > bottom-posting is the preferred style on this mailing list.
>
> I understand.
> I'll be careful from now on :)
>
> (Please Ignore: I attach renamed patch file for updating patch file on
> commitfest system)

I wrote a patch for release v13 - v17 additionally and tested it for
each release branch :)
As a result, two patch is needed for this fix.

copy_from_stdin_no_warning_for_master3.patch -> patch for master branch
copy_from_stdin_no_warning_for_stables.patch -> patch for v13 - v17

check_patches.sh -> utility script for testing above two patches on
each target branches
patch_checking_note_cf.txt -> checking result by check_patches.sh and etc
other files -> files which are needed for testing with check_patches.sh

[commitfest entry]
https://commitfest.postgresql.org/52/5497/

It would be helpful if someone could review patches I wrote :)

--
Best regards,
Ryo Kanbayashi
https://github.com/ryogrid

Commits

  1. ecpg: Restore detection of unsupported COPY FROM STDIN.

  2. plpgsql: pure parser and reentrant scanner

  3. Add support for piping COPY to/from an external program.