mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Adjust XML test case to avoid unstable behavior.
Buildfarm member bowerbird is (inconsistently) showing different results for this test case since we enabled ASLR for MSVC builds. It's not very clear whether that's a bug in its version of libxml2 or the test case is relying on nominally-undefined behavior, ie the ordering of results from XPath's node(). It seems quite unlikely that it's *our* bug though, and what's more, using node() adds nothing to the test coverage so far as our code is concerned. So, tweak the test to not use node(). For the moment, only change HEAD because we've only seen the problem there. Perhaps a case will emerge for back-patching. Discussion: https://postgr.es/m/2655387.1661695793@sss.pgh.pa.us
This commit is contained in:
parent
fede154172
commit
4ea07e7cf3
@ -1555,9 +1555,9 @@ SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml PATH '.', b text PAT
|
||||
(1 row)
|
||||
|
||||
\x
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
|
||||
-[ RECORD 1 ]-----------------------------------------------------------
|
||||
x | pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post
|
||||
x | <n2>&deep</n2>
|
||||
y | <e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>+
|
||||
|
|
||||
|
||||
|
@ -1243,7 +1243,7 @@ LINE 1: SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml ...
|
||||
^
|
||||
DETAIL: This functionality requires the server to be built with libxml support.
|
||||
\x
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
|
||||
ERROR: unsupported XML feature
|
||||
LINE 1: SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?...
|
||||
^
|
||||
|
@ -1535,9 +1535,9 @@ SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml PATH '.', b text PAT
|
||||
(1 row)
|
||||
|
||||
\x
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
|
||||
-[ RECORD 1 ]-----------------------------------------------------------
|
||||
x | pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post
|
||||
x | <n2>&deep</n2>
|
||||
y | <e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>+
|
||||
|
|
||||
|
||||
|
@ -613,7 +613,7 @@ SELECT xmltable.* FROM xmltest2, LATERAL xmltable(('/d/r/' || lower(_path) || 'c
|
||||
-- XPath result can be boolean or number too
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml PATH '.', b text PATH '.', c text PATH '"hi"', d boolean PATH '. = "a"', e integer PATH 'string-length(.)');
|
||||
\x
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
|
||||
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
|
||||
\x
|
||||
|
||||
SELECT * FROM XMLTABLE('.' PASSING XMLELEMENT(NAME a) columns a varchar(20) PATH '"<foo/>"', b xml PATH '"<foo/>"');
|
||||
|
Loading…
x
Reference in New Issue
Block a user