| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Check for Consts in constraint definitions |
| Date: | 2026-11-09 14:21:54 |
| Message-ID: | E1xQQFu-000000003Uy-3qOL@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Amit Langote <amitlangote09(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Security: CVE-2026-6460
Backpatch-through: 14
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1fa8ddab44b1efd620cdd07dca9a4eae09da58dc
Author: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:21:55 | pgsql: Forbid changing type if the rowtype is used in a foreign table |
| Previous Message | Noah Misch | 2026-11-09 14:21:53 | pgsql: Check EXECUTE privilege on type-to-json cast functions. |