diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-11-01 13:32:23 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-11-01 13:32:23 -0400 |
commit | af20e2d728eb508bb169e7294e4e210a3459833a (patch) | |
tree | 774e98c0bce803bef522ccde3abd612b2d4d56a4 /src/include/nodes/parsenodes.h | |
parent | 387ec70322aaf60127537bc200e20791f0b415ae (diff) | |
download | postgresql-af20e2d728eb508bb169e7294e4e210a3459833a.tar.gz postgresql-af20e2d728eb508bb169e7294e4e210a3459833a.zip |
Fix ALTER TABLE code to update domain constraints when needed.
It's possible for dropping a column, or altering its type, to require
changes in domain CHECK constraint expressions; but the code was
previously only expecting to find dependent table CHECK constraints.
Make the necessary adjustments.
This is a fairly old oversight, but it's a lot easier to encounter
the problem in the context of domains over composite types than it
was before. Given the lack of field complaints, I'm not going to
bother with a back-patch, though I'd be willing to reconsider that
decision if someone does complain.
Patch by me, reviewed by Michael Paquier
Discussion: https://postgr.es/m/30656.1509128130@sss.pgh.pa.us
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 732e5d67883..06a2b81fb5b 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1713,6 +1713,7 @@ typedef enum AlterTableType AT_AddConstraint, /* add constraint */ AT_AddConstraintRecurse, /* internal to commands/tablecmds.c */ AT_ReAddConstraint, /* internal to commands/tablecmds.c */ + AT_ReAddDomainConstraint, /* internal to commands/tablecmds.c */ AT_AlterConstraint, /* alter constraint */ AT_ValidateConstraint, /* validate constraint */ AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */ |