Re: [PATCH] Add CANONICAL option to xmlserialize

2024-02-09 Thread Jim Jones
On 05.10.23 09:38, Jim Jones wrote: > > v8 attached changes de default behaviour to WITH COMMENTS. v9 attached with rebase due to changes done to primnodes.h in 615f5f6 -- Jim From fe51a1826b75b778c21f559236b23d340a10d703 Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Fri, 9 Feb 2024 13:51:44

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-10-05 Thread Jim Jones
Hi Chap On 04.10.23 23:05, Chapman Flack wrote: I hope I'm not butting in, but I too would be leery of any default behavior that's going to say thing1 and thing2 are the same thing but ignoring (name part of thing here). If that's the comparison I mean to make, and it's as easy as CANONICAL

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-10-04 Thread Chapman Flack
On 2023-10-04 12:19, Jim Jones wrote: On 04.10.23 11:39, vignesh C wrote: 1) Why the default option was chosen without comments shouldn't it be the other way round? I'm not sure it is the way to go. The main idea is to check if two documents have the same content, and comments might be

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-10-04 Thread Jim Jones
Hi Vignesh Thanks for the thorough review! On 04.10.23 11:39, vignesh C wrote: Few comments: 1) Why the default option was chosen without comments shouldn't it be the other way round? +opt_xml_serialize_format: + INDENT { $$ =

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-10-04 Thread vignesh C
On Fri, 17 Mar 2023 at 18:01, Jim Jones wrote: > > After some more testing I realized that v5 was leaking the xmlDocPtr. > > Now fixed in v6. Few comments: 1) Why the default option was chosen without comments shouldn't it be the other way round? +opt_xml_serialize_format: +

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-09-14 Thread Thomas Munro
On Thu, Sep 14, 2023 at 11:54 PM Jim Jones wrote: > The cfbot started complaining about this patch on "macOS - Ventura - Meson" > > 'Persistent worker failed to start the task: tart isolation failed: failed to > create VM cloned from "ghcr.io/cirruslabs/macos-ventura-base:latest": tart >

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-09-14 Thread Jim Jones
The cfbot started complaining about this patch on "macOS - Ventura - Meson" 'Persistent worker failed to start the task: tart isolation failed: failed to create VM cloned from "ghcr.io/cirruslabs/macos-ventura-base:latest": tart command returned non-zero exit code: ""' Is this a problem in

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-17 Thread Jim Jones
After some more testing I realized that v5 was leaking the xmlDocPtr. Now fixed in v6. From d04d8fdcbedbd5ed88469bd22e079467c26ab7a4 Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Fri, 17 Mar 2023 10:23:48 +0100 Subject: [PATCH v6] Add CANONICAL output format to xmlserialize This patch

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-17 Thread Jim Jones
v5 attached is a rebase over the latest changes in xmlserialize (INDENT output).From 24f045ccf7ac000a509910cb32c54ce4c91e2c33 Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Fri, 17 Mar 2023 10:23:48 +0100 Subject: [PATCH v5] Add CANONICAL output format to xmlserialize This patch introduces the

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-14 Thread Jim Jones
v4 attached fixes an encoding issue at the xml_parse call. It now uses GetDatabaseEncoding(). Best, Jim From 3ff8e7bd9a9e43194d834ba6b125841539d5df1c Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Mon, 6 Mar 2023 14:08:54 +0100 Subject: [PATCH v4] Add CANONICAL format to xmlserialize This

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-06 Thread Jim Jones
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

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-06 Thread Jim Jones
On 06.03.23 00:32, Thomas Munro wrote: I couldn't reproduce that locally either, but I just tested on CI with your patch applied saw the failure, and then removed "PYTHONCOERCECLOCALE=0 LANG=C" and it's all green:

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-05 Thread Thomas Munro
On Mon, Mar 6, 2023 at 11:20 AM Jim Jones wrote: > On 05.03.23 22:00, Thomas Munro wrote: > > could be something to do with > > our environment, since .cirrus.yml sets LANG=C in the 32 bit test run > > -- maybe try that locally? > Also using LANGUAGE=C the result is the same for me - all tests

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-05 Thread Jim Jones
On 05.03.23 22:00, Thomas Munro wrote: The CI run for that failed in an interesting way, only on Debian + Meson, 32 bit. The diffs appear to show that psql has a different opinion of the column width, while building its header (the "--" you get at the top of psql's output), even though the

Re: [PATCH] Add CANONICAL option to xmlserialize

2023-03-05 Thread Thomas Munro
On Mon, Mar 6, 2023 at 7:44 AM Jim Jones wrote: > The attached version includes documentation and tests to the patch. The CI run for that failed in an interesting way, only on Debian + Meson, 32 bit. The diffs appear to show that psql has a different opinion of the column width, while building

[PATCH] Add CANONICAL option to xmlserialize

2023-03-05 Thread Jim Jones
On 27.02.23 14:16, I wrote: Hi, In order to compare pairs of XML documents for equivalence it is necessary to convert them first to their canonical form, as described at W3C Canonical XML 1.1.[1] This spec basically defines a standard physical representation of xml documents that have more