pgsql: Rework parsing of ConstraintAttributeSpec to improve NOT VALID h - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Rework parsing of ConstraintAttributeSpec to improve NOT VALID h
Date
Msg-id E1QWzAi-0006M4-HZ@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d988d92bf0603cdf07a57f57f53a28caf5e951f5

Modified Files
--------------
doc/src/sgml/catalogs.sgml              |    3 +-
doc/src/sgml/ref/alter_table.sgml       |   48 +++++---
src/backend/commands/tablecmds.c        |   13 +-
src/backend/commands/trigger.c          |    2 +
src/backend/parser/gram.y               |  202 +++++++++++++++++++-----------
src/backend/parser/parse_utilcmd.c      |    3 +-
src/backend/utils/adt/ruleutils.c       |    1 -
src/include/nodes/parsenodes.h          |   12 +-
src/interfaces/ecpg/preproc/ecpg.addons |    6 -
9 files changed, 175 insertions(+), 115 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: In pg_upgrade, clean up code layout in validateDirectoryOption()
Next
From: Tom Lane
Date:
Subject: pgsql: Rework parsing of ConstraintAttributeSpec to improve NOT VALID h