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-0006M2-IF@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
------
master

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

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: Tom Lane
Date:
Subject: pgsql: Rework parsing of ConstraintAttributeSpec to improve NOT VALID h
Next
From: Tom Lane
Date:
Subject: pgsql: Use single quotes in preference to double quotes for protecting