diff options
| author | Tom Lane | 2024-07-11 00:15:52 +0000 |
|---|---|---|
| committer | Tom Lane | 2024-07-11 00:15:52 +0000 |
| commit | a134baea7ab0cc907b9d9d3d16f9ac97ec8200be (patch) | |
| tree | 9617a968ed922d28b6d2b259133a47b99ad083b2 /src/test | |
| parent | d1c30fd884b60c6f342e728df046cf2f701e79d7 (diff) | |
Make our back branches compatible with libxml2 2.13.x.
This back-patches HEAD commits 066e8ac6e, 6082b3d5d, e7192486d,
and 896cd266f into supported branches. Changes:
* Use xmlAddChildList not xmlAddChild in XMLSERIALIZE
(affects v16 and up only). This was a flat-out coding mistake
that we got away with due to lax checking in previous versions
of xmlAddChild.
* Use xmlParseInNodeContext not xmlParseBalancedChunkMemory.
This is to dodge a bug in xmlParseBalancedChunkMemory in libxm2
releases 2.13.0-2.13.2. While that bug is now fixed upstream and
will probably never be seen in any production-oriented distro, it is
currently a problem on some more-bleeding-edge-friendly platforms.
* Suppress "chunk is not well balanced" errors from libxml2,
unless it is the only error. This eliminates an error-reporting
discrepancy between 2.13 and older releases. This error is
almost always redundant with previous errors, if not flat-out
inappropriate, which is why 2.13 changed the behavior and why
nobody's likely to miss it.
Erik Wienhold and Tom Lane, 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/test')
| -rw-r--r-- | src/test/regress/expected/xml.out | 9 | ||||
| -rw-r--r-- | src/test/regress/expected/xml_2.out | 3 |
2 files changed, 0 insertions, 12 deletions
diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out index 55ac49be261..5b6ae62c044 100644 --- a/src/test/regress/expected/xml.out +++ b/src/test/regress/expected/xml.out @@ -223,17 +223,11 @@ ERROR: invalid XML content DETAIL: line 1: xmlParseEntityRef: no name <invalidentity>&</invalidentity> ^ -line 1: chunk is not well balanced -<invalidentity>&</invalidentity> - ^ SELECT xmlparse(content '<undefinedentity>&idontexist;</undefinedentity>'); ERROR: invalid XML content DETAIL: line 1: Entity 'idontexist' not defined <undefinedentity>&idontexist;</undefinedentity> ^ -line 1: chunk is not well balanced -<undefinedentity>&idontexist;</undefinedentity> - ^ SELECT xmlparse(content '<invalidns xmlns=''<''/>'); xmlparse --------------------------- @@ -254,9 +248,6 @@ DETAIL: line 1: Entity 'idontexist' not defined line 1: Opening and ending tag mismatch: twoerrors line 1 and unbalanced <twoerrors>&idontexist;</unbalanced> ^ -line 1: chunk is not well balanced -<twoerrors>&idontexist;</unbalanced> - ^ SELECT xmlparse(content '<nosuchprefix:tag/>'); xmlparse --------------------- diff --git a/src/test/regress/expected/xml_2.out b/src/test/regress/expected/xml_2.out index 493c6186e16..6638458ba2d 100644 --- a/src/test/regress/expected/xml_2.out +++ b/src/test/regress/expected/xml_2.out @@ -219,13 +219,11 @@ ERROR: invalid XML content DETAIL: line 1: xmlParseEntityRef: no name <invalidentity>&</invalidentity> ^ -line 1: chunk is not well balanced SELECT xmlparse(content '<undefinedentity>&idontexist;</undefinedentity>'); ERROR: invalid XML content DETAIL: line 1: Entity 'idontexist' not defined <undefinedentity>&idontexist;</undefinedentity> ^ -line 1: chunk is not well balanced SELECT xmlparse(content '<invalidns xmlns=''<''/>'); xmlparse --------------------------- @@ -244,7 +242,6 @@ DETAIL: line 1: Entity 'idontexist' not defined <twoerrors>&idontexist;</unbalanced> ^ line 1: Opening and ending tag mismatch: twoerrors line 1 and unbalanced -line 1: chunk is not well balanced SELECT xmlparse(content '<nosuchprefix:tag/>'); xmlparse --------------------- |
