summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBruce Momjian2007-03-22 20:26:30 +0000
committerBruce Momjian2007-03-22 20:26:30 +0000
commitea3b212feee894ebbb5ae36eabc8273b59674cad (patch)
tree3a888ae680f6bfad09062183227c8f3b62f1406c /src/test
parentf317a03734b4a8cc617a3f244d801ad88535c567 (diff)
Commit newest version of xmlpath().
Nikolay Samokhvalov
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/xml.out14
-rw-r--r--src/test/regress/expected/xml_1.out2
-rw-r--r--src/test/regress/sql/xml.sql1
3 files changed, 13 insertions, 4 deletions
diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out
index 189c22113b..20520d9760 100644
--- a/src/test/regress/expected/xml.out
+++ b/src/test/regress/expected/xml.out
@@ -403,10 +403,10 @@ SELECT table_name, view_definition FROM information_schema.views
-- Text XPath expressions evaluation
SELECT xmlpath('/value', data) FROM xmltest;
- xmlpath
----------
- {one}
- {two}
+ xmlpath
+----------------------
+ {<value>one</value>}
+ {<value>two</value>}
(2 rows)
SELECT xmlpath(NULL, NULL) IS NULL FROM xmltest;
@@ -431,3 +431,9 @@ SELECT xmlpath('//loc:piece/@id', '<local:data xmlns:local="http://127.0.0.1"><l
{1,2}
(1 row)
+SELECT xmlpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
+ xmlpath
+-------------------------
+ {<b>two</b>,<b>etc</b>}
+(1 row)
+
diff --git a/src/test/regress/expected/xml_1.out b/src/test/regress/expected/xml_1.out
index 3ba6e58d2d..3709088dfd 100644
--- a/src/test/regress/expected/xml_1.out
+++ b/src/test/regress/expected/xml_1.out
@@ -212,3 +212,5 @@ SELECT xmlpath('//text()', '<local:data xmlns:local="http://127.0.0.1"><local:pi
ERROR: no XML support in this installation
SELECT xmlpath('//loc:piece/@id', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>', ARRAY[ARRAY['loc'], ARRAY['http://127.0.0.1']]);
ERROR: no XML support in this installation
+SELECT xmlpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
+ERROR: no XML support in this installation
diff --git a/src/test/regress/sql/xml.sql b/src/test/regress/sql/xml.sql
index 32ac15610c..1658a38036 100644
--- a/src/test/regress/sql/xml.sql
+++ b/src/test/regress/sql/xml.sql
@@ -152,3 +152,4 @@ SELECT xmlpath(NULL, NULL) IS NULL FROM xmltest;
SELECT xmlpath('', '<!-- error -->');
SELECT xmlpath('//text()', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>');
SELECT xmlpath('//loc:piece/@id', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>', ARRAY[ARRAY['loc'], ARRAY['http://127.0.0.1']]);
+SELECT xmlpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');