diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-02-21 17:30:56 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-02-21 17:30:56 +0900 |
commit | 984410b923263cac901fa81e0efbe523e9c36df3 (patch) | |
tree | bd42d4c7409a894768ca58b9fdf3a22d6740eeb0 /src/backend/utils/adt/ruleutils.c | |
parent | 7d6d2c4bbd730bd9af191d46d4fb01d5f5c30cf1 (diff) |
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 483bdb2afec9.
Author: Jim Jones <jim.jones@uni-muenster.de>
Discussion: https://postgr.es/m/bebd457e-5b43-46b3-8fc6-f6a6509483ba@uni-muenster.de
Backpatch-through: 16
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 54dad975553..d11a8a20eea 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -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 |