aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.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/outfuncs.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/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index b79b7d1a2d8..939c21f45a4 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.295 2007/01/22 20:00:39 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.296 2007/02/03 14:06:54 petere Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -933,6 +933,9 @@ _outXmlExpr(StringInfo str, XmlExpr *node)
WRITE_NODE_FIELD(named_args);
WRITE_NODE_FIELD(arg_names);
WRITE_NODE_FIELD(args);
+ WRITE_ENUM_FIELD(xmloption, XmlOptionType);
+ WRITE_OID_FIELD(type);
+ WRITE_INT_FIELD(typmod);
}
static void
@@ -1522,6 +1525,16 @@ _outLockingClause(StringInfo str, LockingClause *node)
}
static void
+_outXmlSerialize(StringInfo str, XmlSerialize *node)
+{
+ WRITE_NODE_TYPE("XMLSERIALIZE");
+
+ WRITE_ENUM_FIELD(xmloption, XmlOptionType);
+ WRITE_NODE_FIELD(expr);
+ WRITE_NODE_FIELD(typename);
+}
+
+static void
_outColumnDef(StringInfo str, ColumnDef *node)
{
WRITE_NODE_TYPE("COLUMNDEF");
@@ -2290,6 +2303,9 @@ _outNode(StringInfo str, void *obj)
case T_LockingClause:
_outLockingClause(str, obj);
break;
+ case T_XmlSerialize:
+ _outXmlSerialize(str, obj);
+ break;
default: