mirror of
https://github.com/postgres/postgres.git
synced 2025-08-19 23:22:23 +03:00
Fix XMLTABLE() deparsing to quote namespace names if necessary.
When deparsing an XMLTABLE() expression, XML namespace names were not quoted. However, since they are parsed as ColLabel tokens, some names require double quotes to ensure that they are properly interpreted. Fix by using quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com
This commit is contained in:
@@ -10039,7 +10039,8 @@ get_tablefunc(TableFunc *tf, deparse_context *context, bool showimplicit)
|
||||
if (ns_node != NULL)
|
||||
{
|
||||
get_rule_expr(expr, context, showimplicit);
|
||||
appendStringInfo(buf, " AS %s", strVal(ns_node));
|
||||
appendStringInfo(buf, " AS %s",
|
||||
quote_identifier(strVal(ns_node)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user