| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | 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-03-30 09:44:33 |
| Message-ID: | d84b1dcf-8c8f-4ef5-9012-cf97691866ae@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-03-23 Mo 5:52 AM, Jim Jones wrote:
> rebase + minor changes:
>
> * remove unnecessary volatile qualifier from a variable only read by
> PG_TRY and never accessed by PG_CATCH or PG_END_TRY
> * remove old comment from xml.sql and unnecessary entry from
> system_functions.sql (leftovers from last implementation)
> * add the c14n enum XML_C14N_1_1 instead of its value in the
> xmlC14NDocDumpMemory() call.
>
Here's a very minor tidy up:
- Split Datum xmlcanonicalize(PG_FUNCTION_ARGS) across two lines
- Fixed variable declaration alignment
- Replaced 11-line verbose comment with a single-line /* Canonicalize
the entire document using C14N 1.1 */
- Moved #include <libxml/c14n.h> to alphabetical position
- Removed unnecessary if (doc) / if (xmlbuf) guards on the success-path
cleanup
- Added spaces after casts: (xmlDocPtr) doc, (xmlChar *) xmlbuf,
(xmlChar **) &xmlbuf
I note that your function returns xml, whereas Tom's suggestion was for
a function returning text. I don't think there was any discussion on the
point.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| v22-0001-Add-xmlcanonicalize-function.patch | text/x-patch | 32.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Jones | 2026-03-30 09:58:59 | Re: [PATCH] Add CANONICAL option to xmlserialize |
| Previous Message | Etsuro Fujita | 2026-03-30 09:42:09 | Re: Import Statistics in postgres_fdw before resorting to sampling. |