aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-06-15 19:05:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-06-15 19:06:36 -0400
commitd988d92bf0603cdf07a57f57f53a28caf5e951f5 (patch)
tree3161dd5e59fea02bde0097bb1c50a92e7b692138 /src/backend/utils/adt/ruleutils.c
parent3cfecae3a34853c631eeb75671c6b82638e8e0aa (diff)
downloadpostgresql-d988d92bf0603cdf07a57f57f53a28caf5e951f5.tar.gz
postgresql-d988d92bf0603cdf07a57f57f53a28caf5e951f5.zip
Rework parsing of ConstraintAttributeSpec to improve NOT VALID handling.
The initial commit of the ALTER TABLE ADD FOREIGN KEY NOT VALID feature failed to support labeling such constraints as deferrable. The best fix for this seems to be to fold NOT VALID into ConstraintAttributeSpec. That's a bit more general than the documented syntax, but it allows better-targeted syntax error messages. In addition, do some mostly-but-not-entirely-cosmetic code review for the whole NOT VALID patch.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r--src/backend/utils/adt/ruleutils.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 06cf6fa4f79..00920f9edaa 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1372,7 +1372,6 @@ pg_get_constraintdef_worker(Oid constraintId, bool fullCommand,
appendStringInfo(&buf, " DEFERRABLE");
if (conForm->condeferred)
appendStringInfo(&buf, " INITIALLY DEFERRED");
-
if (!conForm->convalidated)
appendStringInfoString(&buf, " NOT VALID");