summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/xml.out24
-rw-r--r--src/test/regress/expected/xml_1.out24
-rw-r--r--src/test/regress/sql/xml.sql12
3 files changed, 30 insertions, 30 deletions
diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out
index 20520d97606..cec9ea29442 100644
--- a/src/test/regress/expected/xml.out
+++ b/src/test/regress/expected/xml.out
@@ -402,37 +402,37 @@ SELECT table_name, view_definition FROM information_schema.views
(9 rows)
-- Text XPath expressions evaluation
-SELECT xmlpath('/value', data) FROM xmltest;
- xmlpath
+SELECT xpath('/value', data) FROM xmltest;
+ xpath
----------------------
{<value>one</value>}
{<value>two</value>}
(2 rows)
-SELECT xmlpath(NULL, NULL) IS NULL FROM xmltest;
+SELECT xpath(NULL, NULL) IS NULL FROM xmltest;
?column?
----------
t
t
(2 rows)
-SELECT xmlpath('', '<!-- error -->');
+SELECT xpath('', '<!-- error -->');
ERROR: empty XPath expression
-CONTEXT: SQL function "xmlpath" statement 1
-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>');
- xmlpath
+CONTEXT: SQL function "xpath" statement 1
+SELECT xpath('//text()', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>');
+ xpath
----------------
{"number one"}
(1 row)
-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']]);
- xmlpath
----------
+SELECT xpath('//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', 'http://127.0.0.1']]);
+ xpath
+-------
{1,2}
(1 row)
-SELECT xmlpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
- xmlpath
+SELECT xpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
+ xpath
-------------------------
{<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 e922107f8d3..2bf91057705 100644
--- a/src/test/regress/expected/xml_1.out
+++ b/src/test/regress/expected/xml_1.out
@@ -326,29 +326,29 @@ SELECT table_name, view_definition FROM information_schema.views
(2 rows)
-- Text XPath expressions evaluation
-SELECT xmlpath('/value', data) FROM xmltest;
- xmlpath
----------
+SELECT xpath('/value', data) FROM xmltest;
+ xpath
+-------
(0 rows)
-SELECT xmlpath(NULL, NULL) IS NULL FROM xmltest;
-ERROR: unsupported XML feature
-DETAIL: This functionality requires libxml support.
-HINT: You need to re-compile PostgreSQL using --with-libxml.
-CONTEXT: SQL function "xmlpath" statement 1
-SELECT xmlpath('', '<!-- error -->');
+SELECT xpath(NULL, NULL) IS NULL FROM xmltest;
+ ?column?
+----------
+(0 rows)
+
+SELECT xpath('', '<!-- error -->');
ERROR: unsupported XML feature
DETAIL: This functionality requires libxml support.
HINT: You need to re-compile PostgreSQL using --with-libxml.
-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 xpath('//text()', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>');
ERROR: unsupported XML feature
DETAIL: This functionality requires libxml support.
HINT: You need to re-compile PostgreSQL using --with-libxml.
-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 xpath('//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', 'http://127.0.0.1']]);
ERROR: unsupported XML feature
DETAIL: This functionality requires libxml support.
HINT: You need to re-compile PostgreSQL using --with-libxml.
-SELECT xmlpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
+SELECT xpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
ERROR: unsupported XML feature
DETAIL: This functionality requires libxml support.
HINT: You need to re-compile PostgreSQL using --with-libxml.
diff --git a/src/test/regress/sql/xml.sql b/src/test/regress/sql/xml.sql
index 1658a380365..2c9db299fda 100644
--- a/src/test/regress/sql/xml.sql
+++ b/src/test/regress/sql/xml.sql
@@ -147,9 +147,9 @@ SELECT table_name, view_definition FROM information_schema.views
-- Text XPath expressions evaluation
-SELECT xmlpath('/value', data) FROM xmltest;
-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>');
+SELECT xpath('/value', data) FROM xmltest;
+SELECT xpath(NULL, NULL) IS NULL FROM xmltest;
+SELECT xpath('', '<!-- error -->');
+SELECT xpath('//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 xpath('//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', 'http://127.0.0.1']]);
+SELECT xpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');