diff options
Diffstat (limited to 'src/backend/nodes')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 21 | ||||
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 16 | ||||
-rw-r--r-- | src/backend/nodes/outfuncs.c | 16 | ||||
-rw-r--r-- | src/backend/nodes/readfuncs.c | 20 |
4 files changed, 69 insertions, 4 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 5047dc8ad7..3bb95b658d 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.354 2006/12/10 22:13:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.355 2006/12/21 16:05:13 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1137,6 +1137,22 @@ _copyBooleanTest(BooleanTest *from) } /* + * _copyXmlExpr + */ +static XmlExpr * +_copyXmlExpr(XmlExpr *from) +{ + XmlExpr *newnode = makeNode(XmlExpr); + + COPY_SCALAR_FIELD(op); + COPY_STRING_FIELD(name); + COPY_NODE_FIELD(named_args); + COPY_NODE_FIELD(args); + + return newnode; +} + +/* * _copyCoerceToDomain */ static CoerceToDomain * @@ -2966,6 +2982,9 @@ copyObject(void *from) case T_BooleanTest: retval = _copyBooleanTest(from); break; + case T_XmlExpr: + retval = _copyXmlExpr(from); + break; case T_CoerceToDomain: retval = _copyCoerceToDomain(from); break; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index e341b74f3e..ef21e67faf 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.288 2006/12/10 22:13:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.289 2006/12/21 16:05:13 petere Exp $ * *------------------------------------------------------------------------- */ @@ -496,6 +496,17 @@ _equalBooleanTest(BooleanTest *a, BooleanTest *b) } static bool +_equalXmlExpr(XmlExpr *a, XmlExpr *b) +{ + COMPARE_SCALAR_FIELD(op); + COMPARE_STRING_FIELD(name); + COMPARE_NODE_FIELD(named_args); + COMPARE_NODE_FIELD(args); + + return true; +} + +static bool _equalCoerceToDomain(CoerceToDomain *a, CoerceToDomain *b) { COMPARE_NODE_FIELD(arg); @@ -1968,6 +1979,9 @@ equal(void *a, void *b) case T_BooleanTest: retval = _equalBooleanTest(a, b); break; + case T_XmlExpr: + retval = _equalXmlExpr(a, b); + break; case T_CoerceToDomain: retval = _equalCoerceToDomain(a, b); break; diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index daeb3fe872..5ddf60dbbb 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.286 2006/12/10 22:13:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.287 2006/12/21 16:05:13 petere Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -921,6 +921,17 @@ _outBooleanTest(StringInfo str, BooleanTest *node) } static void +_outXmlExpr(StringInfo str, XmlExpr *node) +{ + WRITE_NODE_TYPE("XMLEXPR"); + + WRITE_ENUM_FIELD(op, XmlExprOp); + WRITE_STRING_FIELD(name); + WRITE_NODE_FIELD(named_args); + WRITE_NODE_FIELD(args); +} + +static void _outCoerceToDomain(StringInfo str, CoerceToDomain *node) { WRITE_NODE_TYPE("COERCETODOMAIN"); @@ -2019,6 +2030,9 @@ _outNode(StringInfo str, void *obj) case T_BooleanTest: _outBooleanTest(str, obj); break; + case T_XmlExpr: + _outXmlExpr(str, obj); + break; case T_CoerceToDomain: _outCoerceToDomain(str, obj); break; diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index df0a217027..689cef3edf 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.196 2006/12/10 22:13:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.197 2006/12/21 16:05:13 petere Exp $ * * NOTES * Path and Plan nodes do not have any readfuncs support, because we @@ -765,6 +765,22 @@ _readBooleanTest(void) } /* + * _readXmlExpr + */ +static XmlExpr * +_readXmlExpr(void) +{ + READ_LOCALS(XmlExpr); + + READ_ENUM_FIELD(op, XmlExprOp); + READ_STRING_FIELD(name); + READ_NODE_FIELD(named_args); + READ_NODE_FIELD(args); + + READ_DONE(); +} + +/* * _readCoerceToDomain */ static CoerceToDomain * @@ -1014,6 +1030,8 @@ parseNodeString(void) return_value = _readNullTest(); else if (MATCH("BOOLEANTEST", 11)) return_value = _readBooleanTest(); + else if (MATCH("XMLEXPR", 7)) + return_value = _readXmlExpr(); else if (MATCH("COERCETODOMAIN", 14)) return_value = _readCoerceToDomain(); else if (MATCH("COERCETODOMAINVALUE", 19)) |