Re: [PATCH] Add CANONICAL option to xmlserialize
Jim Jones <jim.jones@uni-muenster.de>
From: Jim Jones <jim.jones@uni-muenster.de>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Chapman Flack <chap@anastigmatix.net>, vignesh C <vignesh21@gmail.com>,
Thomas Munro <thomas.munro@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Vik Fearing <vik@postgresfriends.org>
Date: 2024-09-03T14:43:51Z
Lists: pgsql-hackers
Attachments
- v13-0001-Add-CANONICAL-output-format-to-xmlserialize.patch (text/x-patch) patch v13-0001
v13 attached removes two variables that were left unused after refactoring parsenodes.h and primnodes.h, both booleans related to the INDENT feature of xmlserialize. On 30.08.24 08:05, Jim Jones wrote: > > On 30.08.24 06:46, Pavel Stehule wrote: >> >> čt 29. 8. 2024 v 23:54 odesílatel Jim Jones >> <jim.jones@uni-muenster.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