pgsql: ecpg: Reject multiple header items in GET/SET DESCRIPTOR - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: ecpg: Reject multiple header items in GET/SET DESCRIPTOR
Date
Msg-id E1wWV87-001ZMo-0W@gemulon.postgresql.org
Whole thread
List pgsql-committers
ecpg: Reject multiple header items in GET/SET DESCRIPTOR

Previously, ecpg accepted multiple descriptor header items in GET DESCRIPTOR
and SET DESCRIPTOR, but generated broken C code when they were used.
Although the grammar allowed this syntax, the implementation did not actually
support it.

This commit tightens the ecpg grammar so the header form of GET/SET DESCRIPTOR
accepts only a single header item, matching the implementation and preventing
generation of broken C code.

Also update the documentation synopsis accordingly.

Backpatch to all supported versions.

Author: Masashi Kamura <kamura.masashi@fujitsu.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Lakshmi G <lakshmigcdac@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/OS9PR01MB13174AD7D1829D0644B6BB90E9447A@OS9PR01MB13174.jpnprd01.prod.outlook.com
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4484165b0712f09ca369ed497fc6f504b718abac

Modified Files
--------------
doc/src/sgml/ecpg.sgml                   |  6 +++---
src/interfaces/ecpg/preproc/ecpg.trailer | 12 ++----------
2 files changed, 5 insertions(+), 13 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix memory leak in pgstat_progress_parallel_incr_param()
Next
From: Fujii Masao
Date:
Subject: pgsql: ecpg: Reject multiple header items in GET/SET DESCRIPTOR