Re: [PATCH] Add CANONICAL option to xmlserialize

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add CANONICAL option to xmlserialize
Date: 2023-03-06 13:19:43
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06.03.23 11:50, I wrote:
> I guess this confusion is happening because xml_parse() was being
> called with the database encoding from GetDatabaseEncoding().
> I added a condition before calling xml_parse() to check if the xml
> document has a different encoding than UTF-8
> parse_xml_decl(xml_text2xmlChar(data), NULL, NULL, &encodingStr, NULL);
> encoding = encodingStr ? xmlChar_to_encoding(encodingStr) : PG_UTF8;
> doc = xml_parse(data, XMLOPTION_DOCUMENT, false, encoding, NULL);

It seems that this bug fix didn't change the output of the CI on Debian
+ Meson, 32bit.

I slightly changed the test case to a character that both encodings can
deal with.

v3 attached.

Attachment Content-Type Size
v3-0001-Add-CANONICAL-format-to-xmlserialize.patch text/x-patch 31.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2023-03-06 13:47:03 Re: meson: Optionally disable installation of test modules
Previous Message vignesh C 2023-03-06 13:13:51 Re: Support logical replication of DDLs