| From: | solai v <solai(dot)cdac(at)gmail(dot)com> |
|---|---|
| To: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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: | 2026-09-16 06:51:58 |
| Message-ID: | CAF0whuf1SjYi7=SEH95G9n9bO3bePRq5bTxiL9m06-WzDiAOzQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
I tested the latest v27 patch for adding the xmlcanonicalize() function.
Before applying the patch, xmlcanonicalize() was not available.
ERROR: function xmlcanonicalize(xml) does not exist
After applying the patch, rebuilding PostgreSQL, and starting a fresh
test cluster, the function is available in pg_catalog with the
expected function definition.
xmlcanonicalize(doc xml, keep_comments boolean DEFAULT true)
I also tested the following cases:
- Basic XML canonicalization
-Attribute ordering
-Conversion of empty elements
-Keeping comments (default)
-Removing comments with `keep_comments = false`
-Default value of `keep_comments`
-NULL inputs
-Invalid XML input
The results were as expected. For example, attributes were normalized from:
<foo b="2" a="1" c="3"/>
to:
<foo a="1" b="2" c="3"></foo>
The comment handling also worked as expected.
I ran the regression tests and all tests passed.
So the new functionality is working as expected, and I did not observe
any regression in the test suite.
Regards,
solai
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-09-16 06:53:26 | Re: Distinguish publication exclusions in object addresses |
| Previous Message | Chao Li | 2026-09-16 06:46:07 | Re: Distinguish publication exclusions in object addresses |