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: Avoid scribbling on input node tree in CREATE/ALTER DOMAIN.
Date: Fri, 18 Jun 2021 16:09:41 +0000
Message-ID: <E1luH3t-0002qb-53@gemulon.postgresql.org> (raw)

Avoid scribbling on input node tree in CREATE/ALTER DOMAIN.

This works fine in the "simple Query" code path; but if the
statement is in the plan cache then it's corrupted for future
re-execution.  Apply copyObject() to protect the original
tree from modification, as we've done elsewhere.

This narrow fix is applied only to the back branches.  In HEAD,
the problem was fixed more generally by commit 7c337b6b5; but
that changed ProcessUtility's API, so it's infeasible to
back-patch.

Per bug #17053 from Charles Samborski.

Discussion: https://postgr.es/m/931771.1623893989@sss.pgh.pa.us
Discussion: https://postgr.es/m/17053-3ca3f501bbc212b4@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/102f31a208b85aec542fc93f73a222d98d551694

Modified Files
--------------
src/backend/commands/typecmds.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1luH3t-0002qb-53@gemulon.postgresql.org>
Permalink:  ../E1luH3t-0002qb-53@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1luH3t-0002qb-53@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 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: Avoid scribbling on input node tree in CREATE/ALTER DOMAIN.
  In-Reply-To: <E1luH3t-0002qb-53@gemulon.postgresql.org>
  References: <E1luH3t-0002qb-53@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