]> 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:21 +0000 (19:06 -0400)
commite1ccaff6eea1b48f4b9b28cabaf0f990119b0d19
treea0a27055b145ea815d4658120bf120d8dbe91414
parente3df3572f66aa099d337f013dceef7d519ef8398
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