| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Deprecation warnings on Rocky 10.2 with current dev branch |
| Date: | 2026-07-19 18:30:40 |
| Message-ID: | 688938.1784485840@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> Here's a quick draft that passes check-world, which is enough to give
> me no faith whatsoever. Maybe somebody who knows XML better than me
> can break it. One thing I'm pretty unsure about is having to cons up
> a dummy root node, which is necessary because xmlParseInNodeContext
> takes a parent node not a parent doc. Is that correct? In the case
> where we don't call xmlParseInNodeContext because the string is empty,
> should we still make that node or just leave the document root-less?
After studying the libxml2 source code I realized that
xmlParseInNodeContext doesn't automatically attach anything at all to
the passed-in node or its document; those are used only as context.
So I think we can clean this up noticeably by attaching the content
node list to that root node instead of returning it separately.
Essentially, this is moving the data structure hacking that
xmltotext_with_options did into xml_parse. Here's a slightly less
hasty version.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Modernize-our-parsing-of-XML-data-in-CONTENT-mode.patch | text/x-diff | 12.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2026-07-19 22:32:49 | Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc. |
| Previous Message | Tom Lane | 2026-07-19 16:33:56 | Re: Deprecation warnings on Rocky 10.2 with current dev branch |