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 Smith <smithpb2250@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2023-02-14T21:55:20Z
Lists: pgsql-hackers

Attachments

On 13.02.23 13:15, Jim Jones wrote:
> diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/xml.out /tmp/cirrus-ci-build/build/testrun/regress/regress/results/xml.out
> --- /tmp/cirrus-ci-build/src/test/regress/expected/xml.out	2023-02-12 09:02:57.077569000 +0000
> +++ /tmp/cirrus-ci-build/build/testrun/regress/regress/results/xml.out	2023-02-12 09:05:45.148100000 +0000
> @@ -1695,10 +1695,7 @@
>   -- XML format: empty string
>   SELECT xmlformat('');
>   ERROR:  invalid XML document
> -DETAIL:  line 1: switching encoding : no input
> -
> -^
> -line 1: Document is empty
> +DETAIL:  line 1: Document is empty
>   
>   ^
>   -- XML format: invalid string (whitespaces)

I couldn't figure out why the error messages are different -- I'm 
wondering if the issue is the test environment itself. I just removed 
the troubling test case for now

SELECT xmlformat('');

v7 attached.

Thanks for reviewing this patch!

Best, Jim

Commits

  1. Fix memory leak in XMLSERIALIZE(... INDENT).

  2. doc: Move documentation of md5_password_warnings to a better place

  3. Support [NO] INDENT option in XMLSERIALIZE().

  4. Add an expected-file to match behavior of latest libxml2.