mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Code review for XML patch. Instill a bit of sanity in the location of
the XmlExpr code in various lists, use a representation that has some hope of reverse-listing correctly (though it's still a de-escaping function shy of correctness), generally try to make it look more like Postgres coding conventions.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.356 2006/12/23 00:43:09 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.357 2006/12/24 00:29:18 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1093,6 +1093,23 @@ _copyMinMaxExpr(MinMaxExpr *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _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(arg_names);
|
||||
COPY_NODE_FIELD(args);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyNullIfExpr (same as OpExpr)
|
||||
*/
|
||||
@ -1138,22 +1155,6 @@ _copyBooleanTest(BooleanTest *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _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
|
||||
*/
|
||||
@ -2977,6 +2978,9 @@ copyObject(void *from)
|
||||
case T_MinMaxExpr:
|
||||
retval = _copyMinMaxExpr(from);
|
||||
break;
|
||||
case T_XmlExpr:
|
||||
retval = _copyXmlExpr(from);
|
||||
break;
|
||||
case T_NullIfExpr:
|
||||
retval = _copyNullIfExpr(from);
|
||||
break;
|
||||
@ -2986,9 +2990,6 @@ copyObject(void *from)
|
||||
case T_BooleanTest:
|
||||
retval = _copyBooleanTest(from);
|
||||
break;
|
||||
case T_XmlExpr:
|
||||
retval = _copyXmlExpr(from);
|
||||
break;
|
||||
case T_CoerceToDomain:
|
||||
retval = _copyCoerceToDomain(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user