Re: Missing [NO] INDENT flag in XMLSerialize backward parsing

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Missing [NO] INDENT flag in XMLSerialize backward parsing
Date: 2025-02-21 09:36:07
Message-ID: 88b183f1-ebf9-4f51-9144-3704380ccae7@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2025-02-21 Fr 1:31 AM, Michael Paquier wrote:
> On Thu, Feb 20, 2025 at 02:27:42PM +0100, Jim Jones wrote:
>> This patch adds the missing [NO] INDENT flag to XMLSerialize backward
>> parsing.
> 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");
> + }
>
> Good catch, we are forgetting this option in ruleutils.c. Will fix
> down to v16 where this option has been introduced as you are
> proposing, with NO INDENT showing up in the default case. The three
> expected outputs look OK as written..

The fix has broken cross version upgrade test. Maybe we need to filter
out NO INDENT in releases prior to 16 in AdjustUpgrade.pm?

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2025-02-21 09:36:35 RE: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
Previous Message Jim Jones 2025-02-21 09:33:32 Re: XMLSerialize: version and explicit XML declaration