pgsql: Rework parsing of ConstraintAttributeSpec to improve NOT VALID h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rework parsing of ConstraintAttributeSpec to improve NOT VALID h
Date: 2011-06-15 23:06:52
Message-ID: E1QWzAi-0006M4-HZ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-06-16 01:46:00 pgsql: Use single quotes in preference to double quotes for protecting
Previous Message Bruce Momjian 2011-06-15 21:23:19 pgsql: In pg_upgrade, clean up code layout in validateDirectoryOption()