From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix core dump in transformValuesClause when there are no columns
Date: Mon, 09 May 2022 18:15:59 +0000
Message-ID: <E1no7vK-000mf0-AB@gemulon.postgresql.org> (raw)
Fix core dump in transformValuesClause when there are no columns.
The parser code that transformed VALUES from row-oriented to
column-oriented lists failed if there were zero columns.
You can't write that straightforwardly (though probably you
should be able to), but the case can be reached by expanding
a "tab.*" reference to a zero-column table.
Per bug #17477 from Wang Ke. Back-patch to all supported branches.
Discussion: https://postgr.es/m/17477-0af3c6ac6b0a6ae0@postgresql.org
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4eabaffcada25206c3f8f89f7cb0b27ffb9372bc
Modified Files
--------------
src/backend/parser/analyze.c | 21 +++++++--------------
src/test/regress/expected/select.out | 7 +++++++
src/test/regress/sql/select.sql | 5 +++++
3 files changed, 19 insertions(+), 14 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix core dump in transformValuesClause when there are no columns
In-Reply-To: <E1no7vK-000mf0-AB@gemulon.postgresql.org>
References: <E1no7vK-000mf0-AB@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox