Re: [PATCH] Add CANONICAL option to xmlserialize

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Chapman Flack <chap(at)anastigmatix(dot)net>, vignesh C <vignesh21(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Vik Fearing <vik(at)postgresfriends(dot)org>
Subject: Re: [PATCH] Add CANONICAL option to xmlserialize
Date: 2024-08-30 06:05:27
Message-ID: f8182f62-4537-4273-a62f-a445b9031fd7@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30.08.24 06:46, Pavel Stehule wrote:
>
>
> čt 29. 8. 2024 v 23:54 odesílatel Jim Jones
> <jim(dot)jones(at)uni-muenster(dot)de> napsal:
>
>
> > +SELECT xmlserialize(CONTENT doc AS text CANONICAL) =
> > xmlserialize(CONTENT doc AS text CANONICAL WITH COMMENTS) FROM
> > xmltest_serialize;
> > + ?column?
> > +----------
> > + t
> > + t
> > +(2 rows)
> >
> > Maybe I am a little bit confused by these regress tests, because at
> > the end it is not too useful - you compare two identical XML,
> and WITH
> > COMMENTS and WITHOUT COMMENTS is tested elsewhere. I tried to search
> > for a sense of this test.  Better to use really different documents
> > (columns) instead.
>
> Yeah, I can see that it's confusing. In this example I actually just
> wanted to test that the default option of CANONICAL is CANONICAL WITH
> COMMENTS, even if you don't mention it. In the docs I mentioned it
> like
> this:
>
> "The optional parameters WITH COMMENTS (which is the default) or
> WITH NO
> COMMENTS, respectively, keep or remove XML comments from the given
> document."
>
> Perhaps I should rephrase it? Or maybe a comment in the regression
> tests
> would suffice?
>
>
> comment will be enough
>

v12 attached adds a comment to this test.

Thanks

--
Jim

Attachment Content-Type Size
v12-0001-Add-CANONICAL-output-format-to-xmlserialize.patch text/x-patch 47.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2024-08-30 06:23:04 Re: Collect statistics about conflicts in logical replication
Previous Message Stepan Neretin 2024-08-30 05:34:08 Supporting pg freeze in pg_dump, restore.