mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Simplify syntax for ALTER TABLE ALTER CONSTRAINT NO INHERIT
Commit d45597f72f 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@eisentraut.org>
Reviewed-by: Suraj Kharage <suraj.kharage@enterprisedb.com>
Discussion: https://postgr.es/m/202503251602.vsxaehsyaoac@alvherre.pgsql
This commit is contained in:
@@ -12199,7 +12199,7 @@ ATExecAlterConstrInheritability(List **wqueue, ATAlterConstraint *cmdcon,
|
||||
colName = get_attname(currcon->conrelid, colNum, false);
|
||||
|
||||
/*
|
||||
* Propagate the change to children. For SET NO INHERIT, we don't
|
||||
* Propagate the change to children. For this subcommand type we don't
|
||||
* recursively affect children, just the immediate level.
|
||||
*/
|
||||
children = find_inheritance_children(RelationGetRelid(rel),
|
||||
|
||||
Reference in New Issue
Block a user