Re: ECPG: inconsistent behavior with the document in “GET/SET DESCRIPTOR.”

From: lakshmi <lakshmigcdac(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "Masashi Kamura (Fujitsu)" <kamura(dot)masashi(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ECPG: inconsistent behavior with the document in “GET/SET DESCRIPTOR.”
Date: 2026-04-21 11:58:19
Message-ID: CAEvyyThY2MAJpBa3nAS=ZxfiqUtesDiPbN=D=spp8X8A78igSA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
Thanks for the clarification.
from my testing, the current implementation generates invalid code when
multiple header assignments are used, so rejecting the syntax avoids the
issue for now.

That said, supporting multiple COUNT assignments could be useful, but it
would need changes in the code generation. It might be worth checking how
this is handled in the SQL standard or other precompilers.

Regards,
Lakshmi G

On Tue, Apr 21, 2026 at 1:20 PM Hayato Kuroda (Fujitsu) <
kuroda(dot)hayato(at)fujitsu(dot)com> wrote:

> Dear Lakshmi,
>
> > After applying the patch and rebuilding ecpg, the same statement is now
> rejected
> > during preprocessing with a syntax error. So the patch works as expected.
>
> His patch may work well, but I'm unclear whether it's the correct way to
> fix.
> See my question [1]:
>
> ```
> IIUC, there is another approach, allowing to specify multiple COUNT clause
> in the SET/GET DESCRIPTOR. E.g.,
> ```
>
> We may have to follow SQL standard or other precompilers like Pro*C.
> (Not sure we should spend the effort for the investigation though)
>
> [1]:
> https://www.postgresql.org/message-id/OS9PR01MB12149D090EDD1D8D70770DED7F5232%40OS9PR01MB12149.jpnprd01.prod.outlook.com
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-04-21 12:12:58 Re: Incorrect checksum in control file with pg_rewind test
Previous Message Ayush Tiwari 2026-04-21 11:40:07 Re: [PATCH] Fix column name escaping in postgres_fdw stats import