OSDN Git Service

Merge the Constraint and FkConstraint node types into a single type.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Jul 2009 02:45:38 +0000 (02:45 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Jul 2009 02:45:38 +0000 (02:45 +0000)
commit060baf27844163c0874c72d7baf08d3bf9a8ffce
treeb011e0000cb299f0c9ffb634931e30fcec3d2094
parent78aef14c5935bca92d0cacaa9d188f588d7f2444
Merge the Constraint and FkConstraint node types into a single type.

This was foreseen to be a good idea long ago, but nobody had got round
to doing it.  The recent patch for deferred unique constraints made
transformConstraintAttrs() ugly enough that I decided it was time.
This change will also greatly simplify parsing of deferred CHECK constraints,
if anyone ever gets around to implementing that.

While at it, add a location field to Constraint, and use that to provide
an error cursor for some of the constraint-related error messages.
12 files changed:
src/backend/catalog/heap.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/commands/typecmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/parser/gram.y
src/backend/parser/parse_utilcmd.c
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h