aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/equalfuncs.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2007-02-03 14:06:56 +0000
committerPeter Eisentraut <peter_e@gmx.net>2007-02-03 14:06:56 +0000
commitec020e1ceb94d0ceb3c0eee8c39cd197be7bb3cb (patch)
tree99f52eea439dd239d8e9a7f04f70f567b88ee798 /src/backend/nodes/equalfuncs.c
parent25dc46334b99f3161d931a608fb49f6eced42065 (diff)
downloadpostgresql-ec020e1ceb94d0ceb3c0eee8c39cd197be7bb3cb.tar.gz
postgresql-ec020e1ceb94d0ceb3c0eee8c39cd197be7bb3cb.zip
Implement XMLSERIALIZE for real. Analogously, make the xml to text cast
observe the xmloption. Reorganize the representation of the XML option in the parse tree and the API to make it easier to manage and understand. Add regression tests for parsing back XML expressions.
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r--src/backend/nodes/equalfuncs.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 31754a7bc02..c17a40bbbb2 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.297 2007/01/23 05:07:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.298 2007/02/03 14:06:54 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -462,6 +462,9 @@ _equalXmlExpr(XmlExpr *a, XmlExpr *b)
COMPARE_NODE_FIELD(named_args);
COMPARE_NODE_FIELD(arg_names);
COMPARE_NODE_FIELD(args);
+ COMPARE_SCALAR_FIELD(xmloption);
+ COMPARE_SCALAR_FIELD(type);
+ COMPARE_SCALAR_FIELD(typmod);
return true;
}
@@ -1830,6 +1833,15 @@ _equalFkConstraint(FkConstraint *a, FkConstraint *b)
return true;
}
+static bool
+_equalXmlSerialize(XmlSerialize *a, XmlSerialize *b)
+{
+ COMPARE_SCALAR_FIELD(xmloption);
+ COMPARE_NODE_FIELD(expr);
+ COMPARE_NODE_FIELD(typename);
+
+ return true;
+}
/*
* Stuff from pg_list.h
@@ -2411,6 +2423,9 @@ equal(void *a, void *b)
case T_FuncWithArgs:
retval = _equalFuncWithArgs(a, b);
break;
+ case T_XmlSerialize:
+ retval = _equalXmlSerialize(a, b);
+ break;
default:
elog(ERROR, "unrecognized node type: %d",