1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

Add missing deparsing of [NO] IDENT to XMLSERIALIZE()

NO INDENT is the default, and is added if no explicit indentation
flag was provided with XMLSERIALIZE().

Oversight in 483bdb2afe.

Author: Jim Jones <jim.jones@uni-muenster.de>
Discussion: https://postgr.es/m/bebd457e-5b43-46b3-8fc6-f6a6509483ba@uni-muenster.de
Backpatch-through: 16
This commit is contained in:
Michael Paquier
2025-02-21 17:30:56 +09:00
parent 7d6d2c4bbd
commit 984410b923
5 changed files with 39 additions and 12 deletions

View File

@@ -10142,9 +10142,16 @@ get_rule_expr(Node *node, deparse_context *context,
}
}
if (xexpr->op == IS_XMLSERIALIZE)
{
appendStringInfo(buf, " AS %s",
format_type_with_typemod(xexpr->type,
xexpr->typmod));
if (xexpr->indent)
appendStringInfoString(buf, " INDENT");
else
appendStringInfoString(buf, " NO INDENT");
}
if (xexpr->op == IS_DOCUMENT)
appendStringInfoString(buf, " IS DOCUMENT");
else