aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-07-06 15:16:13 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-07-06 15:16:13 -0400
commit066e8ac6ea8bc2af79dc86273a09ba7c1a39f7fd (patch)
tree891bf51c6007e0304b02f9f44cff988e3fee38c2 /src/backend/utils/adt/xml.c
parent04bcf9e19a4261fe9c7df37c777592c2e10c32a7 (diff)
downloadpostgresql-066e8ac6ea8bc2af79dc86273a09ba7c1a39f7fd.tar.gz
postgresql-066e8ac6ea8bc2af79dc86273a09ba7c1a39f7fd.zip
Use xmlAddChildList not xmlAddChild in XMLSERIALIZE.
It looks like we should have been doing this all along, but we got away with the wrong coding until libxml2 2.13.0 tightened up xmlAddChild's behavior. There is more stuff to be fixed to be compatible with 2.13.0, and it will all need to be back-patched. This is just a trial commit to see if the buildfarm agrees that we can use xmlAddChildList unconditionally. Erik Wienhold, per report from Frank Streitzig. Discussion: https://postgr.es/m/trinity-b0161630-d230-4598-9ebc-7a23acdb37cb-1720186432160@3c-app-gmx-bap25 Discussion: https://postgr.es/m/trinity-361ba18b-541a-4fe7-bc63-655ae3a7d599-1720259822452@3c-app-gmx-bs01
Diffstat (limited to 'src/backend/utils/adt/xml.c')
-rw-r--r--src/backend/utils/adt/xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 3e4ca874d81..d75f765de0d 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -757,7 +757,7 @@ xmltotext_with_options(xmltype *data, XmlOptionType xmloption_arg, bool indent)
/* This attaches root to doc, so we need not free it separately. */
xmlDocSetRootElement(doc, root);
- xmlAddChild(root, content_nodes);
+ xmlAddChildList(root, content_nodes);
/*
* We use this node to insert newlines in the dump. Note: in at