mirror of
https://github.com/postgres/postgres.git
synced 2025-08-14 02:22:38 +03:00
De-escape XML names when reverse-compiling XML expressions.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* ruleutils.c - Functions to convert stored expressions/querytrees
|
||||
* back to source text
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.238 2006/12/24 00:29:19 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.239 2006/12/29 10:50:22 petere Exp $
|
||||
**********************************************************************/
|
||||
|
||||
#include "postgres.h"
|
||||
@@ -3810,11 +3810,8 @@ get_rule_expr(Node *node, deparse_context *context,
|
||||
}
|
||||
if (xexpr->name)
|
||||
{
|
||||
/*
|
||||
* XXX need to de-escape the name
|
||||
*/
|
||||
appendStringInfo(buf, "NAME %s",
|
||||
quote_identifier(xexpr->name));
|
||||
quote_identifier(map_xml_name_to_sql_identifier(xexpr->name)));
|
||||
needcomma = true;
|
||||
}
|
||||
if (xexpr->named_args)
|
||||
@@ -3834,11 +3831,8 @@ get_rule_expr(Node *node, deparse_context *context,
|
||||
if (needcomma)
|
||||
appendStringInfoString(buf, ", ");
|
||||
get_rule_expr((Node *) e, context, true);
|
||||
/*
|
||||
* XXX need to de-escape the name
|
||||
*/
|
||||
appendStringInfo(buf, " AS %s",
|
||||
quote_identifier(argname));
|
||||
quote_identifier(map_xml_name_to_sql_identifier(argname)));
|
||||
needcomma = true;
|
||||
}
|
||||
if (xexpr->op != IS_XMLFOREST)
|
||||
|
Reference in New Issue
Block a user