Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ea07e7

Browse files
committed
Adjust XML test case to avoid unstable behavior.
Buildfarm member bowerbird is (inconsistently) showing differentresults 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 libxml2or the test case is relying on nominally-undefined behavior, ie theordering of results from XPath's node(). It seems quite unlikelythat it's *our* bug though, and what's more, using node() addsnothing 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 theproblem there. Perhaps a case will emerge for back-patching.Discussion:https://postgr.es/m/2655387.1661695793@sss.pgh.pa.us
1 parentfede154 commit4ea07e7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

‎src/test/regress/expected/xml.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,9 +1555,9 @@ SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml PATH '.', b text PAT
15551555
(1 row)
15561556

15571557
\x
1558-
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
1558+
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
15591559
-[ RECORD 1 ]-----------------------------------------------------------
1560-
x |pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post
1560+
x |<n2>&amp;deep</n2>
15611561
y | <e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>+
15621562
|
15631563

‎src/test/regress/expected/xml_1.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ LINE 1: SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml ...
12431243
^
12441244
DETAIL: This functionality requires the server to be built with libxml support.
12451245
\x
1246-
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
1246+
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
12471247
ERROR: unsupported XML feature
12481248
LINE 1: SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?...
12491249
^

‎src/test/regress/expected/xml_2.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,9 +1535,9 @@ SELECT * FROM XMLTABLE('*' PASSING '<a>a</a>' COLUMNS a xml PATH '.', b text PAT
15351535
(1 row)
15361536

15371537
\x
1538-
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xml PATH 'node()', y xml PATH '/');
1538+
SELECT * FROM XMLTABLE('*' PASSING '<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xml PATH '/e/n2', y xml PATH '/');
15391539
-[ RECORD 1 ]-----------------------------------------------------------
1540-
x |pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post
1540+
x |<n2>&amp;deep</n2>
15411541
y | <e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>+
15421542
|
15431543

‎src/test/regress/sql/xml.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ SELECT xmltable.* FROM xmltest2, LATERAL xmltable(('/d/r/' || lower(_path) || 'c
613613
-- XPath result can be boolean or number too
614614
SELECT*FROM XMLTABLE('*' PASSING'<a>a</a>' COLUMNS a xmlPATH'.', btextPATH'.', ctextPATH'"hi"', dbooleanPATH'. = "a"', eintegerPATH'string-length(.)');
615615
\x
616-
SELECT*FROM XMLTABLE('*' PASSING'<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xmlPATH'node()', y xmlPATH'/');
616+
SELECT*FROM XMLTABLE('*' PASSING'<e>pre<!--c1--><?pi arg?><![CDATA[&ent1]]><n2>&amp;deep</n2>post</e>' COLUMNS x xmlPATH'/e/n2', y xmlPATH'/');
617617
\x
618618

619619
SELECT*FROM XMLTABLE('.' PASSING XMLELEMENT(NAME a) columns avarchar(20)PATH'"<foo/>"', b xmlPATH'"<foo/>"');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp