Re: [PATCH] Add pretty-printed XML output option
Jim Jones <jim.jones@uni-muenster.de>
From: Jim Jones <jim.jones@uni-muenster.de>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Peter Smith <smithpb2250@gmail.com>
Cc: Nikolay Samokhvalov <samokhvalov@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Andrey Borodin <amborodin86@gmail.com>
Date: 2023-02-23T08:20:00Z
Lists: pgsql-hackers
Attachments
- v19-0001-Add-pretty-printed-XML-output-option.patch (text/x-patch) patch v19-0001
On 23.02.23 08:51, Peter Eisentraut wrote:
> In kwlist.h you have
>
> PG_KEYWORD("indent", INDENT, UNRESERVED_KEYWORD, AS_LABEL)
>
> but you can actually make it BARE_LABEL, which is preferable.
>
> More importantly, you need to add the new keyword to the
> bare_label_keyword production in gram.y. I thought we had some
> tooling in the build system to catch this kind of omission, but it's
> apparently not working right now.
Entry in kwlist.h changed to BARE_LABEL.
>
> Elsewhere, let's rename the xmlformat() C function to xmlserialize()
> (or maybe something like xmlserialize_indent()), so the association is
> clearer.
>
xmlserialize_indent sounds much better and makes the association indeed
clearer. Changed in v19.
v19 attached.
Thanks for the review!
Best, Jim
Commits
-
Fix memory leak in XMLSERIALIZE(... INDENT).
- f24605e2dc16 18.0 landed
- ee58de10084b 16.10 landed
- 20bae0690322 17.6 landed
-
doc: Move documentation of md5_password_warnings to a better place
- f3622b64762b 18.0 cited
-
Support [NO] INDENT option in XMLSERIALIZE().
- 483bdb2afec9 16.0 landed
-
Add an expected-file to match behavior of latest libxml2.
- 085423e3e326 9.6.0 cited