From: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Simplify syntax for ALTER TABLE ALTER CONSTRAINT NO INHERIT |
Date: | 2025-03-27 08:25:39 |
Message-ID: | E1txiYV-001EKF-1c@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Simplify syntax for ALTER TABLE ALTER CONSTRAINT NO INHERIT
Commit d45597f72fe5 introduced the ability to change a not-null
constraint from NO INHERIT to INHERIT and vice versa, but we included
the SET noise word in the syntax for it. The SET turns out not to be
necessary and goes against what the SQL standard says for other ALTER
TABLE subcommands, so remove it.
This changes the way this command is processed for constraint types
other than not-null, so there are some error message changes.
Reviewed-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Reviewed-by: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
Discussion: https://postgr.es/m/202503251602.vsxaehsyaoac@alvherre.pgsql
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4a02af8b1a5f3f8221c7381bc4de08a3d830f682
Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml | 6 +++---
src/backend/commands/tablecmds.c | 2 +-
src/backend/parser/gram.y | 26 ++++++++------------------
src/test/regress/expected/foreign_key.out | 4 +---
src/test/regress/expected/inherit.out | 30 +++++++++++++++---------------
src/test/regress/sql/inherit.sql | 30 +++++++++++++++---------------
6 files changed, 43 insertions(+), 55 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Herrera | 2025-03-27 08:47:24 | Re: Squash constant lists in query jumbling by default |
Previous Message | Michael Paquier | 2025-03-27 07:03:36 | pgsql: libpq: Add TAP tests for service files and names |