]> granicus.if.org Git - postgresql/commit
Rework parsing of ConstraintAttributeSpec to improve NOT VALID handling.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 15 Jun 2011 23:05:11 +0000 (19:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 15 Jun 2011 23:06:36 +0000 (19:06 -0400)
commitd988d92bf0603cdf07a57f57f53a28caf5e951f5
tree3161dd5e59fea02bde0097bb1c50a92e7b692138
parent3cfecae3a34853c631eeb75671c6b82638e8e0aa
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.
doc/src/sgml/catalogs.sgml
doc/src/sgml/ref/alter_table.sgml
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/parser/gram.y
src/backend/parser/parse_utilcmd.c
src/backend/utils/adt/ruleutils.c
src/include/nodes/parsenodes.h
src/interfaces/ecpg/preproc/ecpg.addons