pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix assignment to array of domain over composite, redux.
Date: Sat, 15 Apr 2023 16:01:50 +0000
Message-ID: <E1pniLV-003DSR-3A@gemulon.postgresql.org> (raw)

Fix assignment to array of domain over composite, redux.

Commit 3e310d837 taught isAssignmentIndirectionExpr() to look through
CoerceToDomain nodes.  That's not sufficient, because since commit
04fe805a1 it's been possible for the planner to simplify
CoerceToDomain to RelabelType when the domain has no constraints
to enforce.  So we need to look through RelabelType too.

Per bug #17897 from Alexander Lakhin.  Although 3e310d837 was
back-patched to v11, it seems sufficient to apply this change
to v12 and later, since 04fe805a1 came in in v12.

Dmitry Dolgov

Discussion: https://postgr.es/m/17897-4216c546c3874044@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/048caf8d757a94db043ddbc4d0b1131c1544fee1

Modified Files
--------------
src/backend/executor/execExpr.c      | 10 ++++++++--
src/test/regress/expected/domain.out |  9 +++++++++
src/test/regress/sql/domain.sql      |  4 ++++
3 files changed, 21 insertions(+), 2 deletions(-)



view thread (10+ messages)  latest in thread

Message-ID: <E1pniLV-003DSR-3A@gemulon.postgresql.org>
Permalink:  ../E1pniLV-003DSR-3A@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pniLV-003DSR-3A@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix assignment to array of domain over composite, redux.
  In-Reply-To: <E1pniLV-003DSR-3A@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