diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/xml.out | 27 | ||||
-rw-r--r-- | src/test/regress/expected/xml_1.out | 10 | ||||
-rw-r--r-- | src/test/regress/sql/xml.sql | 7 |
3 files changed, 44 insertions, 0 deletions
diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out index 275523727b4..c33fd8e414a 100644 --- a/src/test/regress/expected/xml.out +++ b/src/test/regress/expected/xml.out @@ -228,6 +228,33 @@ SELECT xmlserialize(content data as character varying) FROM xmltest; <value>two</value> (2 rows) +SELECT xml '<foo>bar</foo>' IS DOCUMENT; + ?column? +---------- + t +(1 row) + +SELECT xml '<foo>bar</foo><bar>foo</bar>' IS DOCUMENT; + ?column? +---------- + f +(1 row) + +SELECT xml '<abc/>' IS NOT DOCUMENT; + ?column? +---------- + f +(1 row) + +SELECT xml 'abc' IS NOT DOCUMENT; + ?column? +---------- + t +(1 row) + +SELECT '<>' IS NOT DOCUMENT; +ERROR: invalid XML content +DETAIL: Element name not found -- Check mapping SQL identifier to XML name SELECT xmlpi(name ":::_xml_abc135.%-&_"); xmlpi diff --git a/src/test/regress/expected/xml_1.out b/src/test/regress/expected/xml_1.out index 9ff3959160e..4534ae98cc5 100644 --- a/src/test/regress/expected/xml_1.out +++ b/src/test/regress/expected/xml_1.out @@ -107,6 +107,16 @@ SELECT xmlserialize(content data as character varying) FROM xmltest; ------ (0 rows) +SELECT xml '<foo>bar</foo>' IS DOCUMENT; +ERROR: no XML support in this installation +SELECT xml '<foo>bar</foo><bar>foo</bar>' IS DOCUMENT; +ERROR: no XML support in this installation +SELECT xml '<abc/>' IS NOT DOCUMENT; +ERROR: no XML support in this installation +SELECT xml 'abc' IS NOT DOCUMENT; +ERROR: no XML support in this installation +SELECT '<>' IS NOT DOCUMENT; +ERROR: no XML support in this installation -- Check mapping SQL identifier to XML name SELECT xmlpi(name ":::_xml_abc135.%-&_"); ERROR: no XML support in this installation diff --git a/src/test/regress/sql/xml.sql b/src/test/regress/sql/xml.sql index a22c8251298..4492a62cdb0 100644 --- a/src/test/regress/sql/xml.sql +++ b/src/test/regress/sql/xml.sql @@ -86,6 +86,13 @@ SELECT xmlroot ( SELECT xmlserialize(content data as character varying) FROM xmltest; +SELECT xml '<foo>bar</foo>' IS DOCUMENT; +SELECT xml '<foo>bar</foo><bar>foo</bar>' IS DOCUMENT; +SELECT xml '<abc/>' IS NOT DOCUMENT; +SELECT xml 'abc' IS NOT DOCUMENT; +SELECT '<>' IS NOT DOCUMENT; + + -- Check mapping SQL identifier to XML name SELECT xmlpi(name ":::_xml_abc135.%-&_"); |