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

Masashi Kamura (Fujitsu) <kamura.masashi@fujitsu.com>

From: "Masashi Kamura (Fujitsu)" <kamura.masashi@fujitsu.com>
To: 'lakshmi' <lakshmigcdac@gmail.com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2026-04-21T08:50:24Z
Lists: pgsql-hackers
Hi Lakshmi,

Thanks for confirming that the issue can be reproduced.



Regards,

Masashi Kamura

Fujitsu Limited

From: lakshmi <lakshmigcdac@gmail.com>
Sent: Monday, April 20, 2026 4:19 PM
To: Kuroda, Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com>
Cc: Kamura, Masashi/嘉村 雅志 <kamura.masashi@fujitsu.com>; pgsql-hackers@postgresql.org
Subject: Re: ECPG: inconsistent behavior with the document in “GET/SET DESCRIPTOR.”


Hi,

I was able to reproduce this issue.

The precompiler accepts:

EXEC SQL GET DESCRIPTOR d :desc_count1 = count, :desc_count2 = count;

but generates invalid C code with concatenated variables, which fails at compile time.

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.

Thanks for the fix.

Regards,
Lakshmi G

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. ecpg: Reject multiple header items in GET/SET DESCRIPTOR