From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Un-break whole-row Vars referencing domain-over-composite types.
Date: Fri, 10 Jun 2022 14:36:10 +0000
Message-ID: <E1nzfk9-003d7P-Th@gemulon.postgresql.org> (raw)
Un-break whole-row Vars referencing domain-over-composite types.
In commit ec62cb0aa, I foolishly replaced ExecEvalWholeRowVar's
lookup_rowtype_tupdesc_domain call with just lookup_rowtype_tupdesc,
because I didn't see how a domain could be involved there, and
there were no regression test cases to jog my memory. But the
existing code was correct, so revert that change and add a test
case showing why it's necessary. (Note: per comment in struct
DatumTupleFields, it is correct to produce an output tuple that's
labeled with the base composite type, not the domain; hence just
blindly looking through the domain is correct here.)
Per bug #17515 from Dan Kubb. Back-patch to v11 where domains over
composites became a thing.
Discussion: https://postgr.es/m/17515-a24737438363aca0@postgresql.org
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d3ef5c3ef454ccd4a14b64e577777179a91c1641
Modified Files
--------------
src/backend/executor/execExprInterp.c | 6 +++++-
src/test/regress/expected/domain.out | 23 +++++++++++++++++++++++
src/test/regress/sql/domain.sql | 9 +++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
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: Un-break whole-row Vars referencing domain-over-composite types.
In-Reply-To: <E1nzfk9-003d7P-Th@gemulon.postgresql.org>
References: <E1nzfk9-003d7P-Th@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