pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check for Consts in constraint definitions
Date: Mon, 09 Nov 2026 14:21:54 +0000
Message-ID: <E1xQQFu-000000003Uy-3qOL@gemulon.postgresql.org> (raw)

Check for Consts in constraint definitions

Similar to previous commit, we also need to look more closely at a
dependency from a constraint to a composite type.  The constraint's
DEFAULT might contain a Const or other expression that would need to
be rewritten, if the composite type was ALTERed.

For all reporters and public discussions, see previous commits.

Co-authored-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Security: CVE-2026-6460
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1fa8ddab44b1efd620cdd07dca9a4eae09da58dc
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>

Modified Files
--------------
src/backend/commands/tablecmds.c                | 32 ++++++++++++++++++++++++-
src/test/regress/expected/alter_column_type.out | 23 ++++--------------
src/test/regress/expected/alter_table.out       |  9 ++++---
src/test/regress/sql/alter_column_type.sql      | 10 ++------
src/test/regress/sql/alter_table.sql            |  7 +++---
5 files changed, 44 insertions(+), 37 deletions(-)



view thread (2+ messages)

Message-ID: <E1xQQFu-000000003Uy-3qOL@gemulon.postgresql.org>
Permalink:  ../E1xQQFu-000000003Uy-3qOL@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xQQFu-000000003Uy-3qOL@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: noah@leadboat.com
  Subject: Re: pgsql: Check for Consts in constraint definitions
  In-Reply-To: <E1xQQFu-000000003Uy-3qOL@gemulon.postgresql.org>
  References: <E1xQQFu-000000003Uy-3qOL@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