summaryrefslogtreecommitdiff
path: root/src/backend/nodes/nodeFuncs.c
diff options
context:
space:
mode:
authorTom Lane2009-07-30 02:45:38 +0000
committerTom Lane2009-07-30 02:45:38 +0000
commit61c5af938de978a98372be0c8fa6991d2476e807 (patch)
tree0dfaa8802508c879b32ee9d00d84ae04df2f920d /src/backend/nodes/nodeFuncs.c
parentc1374e3c277e272405bfa80949bae1d16b6b6747 (diff)
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.
Diffstat (limited to 'src/backend/nodes/nodeFuncs.c')
-rw-r--r--src/backend/nodes/nodeFuncs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index 7de7f355a7..58159d66bc 100644
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -903,6 +903,9 @@ exprLocation(Node *expr)
case T_TypeName:
loc = ((TypeName *) expr)->location;
break;
+ case T_Constraint:
+ loc = ((Constraint *) expr)->location;
+ break;
case T_XmlSerialize:
/* XMLSERIALIZE keyword should always be the first thing */
loc = ((XmlSerialize *) expr)->location;