aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/nodeFuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-07-30 02:45:38 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-07-30 02:45:38 +0000
commit060baf27844163c0874c72d7baf08d3bf9a8ffce (patch)
treeb011e0000cb299f0c9ffb634931e30fcec3d2094 /src/backend/nodes/nodeFuncs.c
parent78aef14c5935bca92d0cacaa9d188f588d7f2444 (diff)
downloadpostgresql-060baf27844163c0874c72d7baf08d3bf9a8ffce.tar.gz
postgresql-060baf27844163c0874c72d7baf08d3bf9a8ffce.zip
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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index 4dc9bd4bbf7..61c0e21db08 100644
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/nodeFuncs.c,v 1.41 2009/07/16 06:33:42 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/nodeFuncs.c,v 1.42 2009/07/30 02:45:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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;