summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2007-01-23 23:39:16 +0000
committerPeter Eisentraut2007-01-23 23:39:16 +0000
commit4e8b5cd94bd24e8162ef4fd45d0ce621481844da (patch)
tree32c5c4f806279d62cd63dee37d48ac474b8d8826 /src/test
parenta56c5fb0f591090967e1848c7749ed67ecc0218f (diff)
Simplify handling of XML error messages: Just use the string provided by
libxml as the detail message. As per <http://archives.postgresql.org/pgsql-hackers/2006-12/msg01087.php>. For converting error codes to messages, we only need to cover those codes that we raise ourselves now.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/xml.out16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out
index 8c76dcee0c8..d91d7653036 100644
--- a/src/test/regress/expected/xml.out
+++ b/src/test/regress/expected/xml.out
@@ -6,7 +6,9 @@ INSERT INTO xmltest VALUES (1, '<value>one</value>');
INSERT INTO xmltest VALUES (2, '<value>two</value>');
INSERT INTO xmltest VALUES (3, '<wrong');
ERROR: invalid XML content
-DETAIL: Expected '>'
+DETAIL: Entity: line 1: parser error : Couldn't find end of Start Tag wrong line 1
+<wrong
+ ^
SELECT * FROM xmltest;
id | data
----+--------------------
@@ -54,7 +56,9 @@ SELECT xmlconcat(1, 2);
ERROR: argument of XMLCONCAT must be type xml, not type integer
SELECT xmlconcat('bad', '<syntax');
ERROR: invalid XML content
-DETAIL: Expected '>'
+DETAIL: Entity: line 1: parser error : Couldn't find end of Start Tag syntax line 1
+<syntax
+ ^
SELECT xmlconcat('<foo/>', NULL, '<?xml version="1.1" standalone="no"?><bar/>');
xmlconcat
-----------------------------------
@@ -155,7 +159,9 @@ SELECT xmlparse(content '<abc>x</abc>');
SELECT xmlparse(document 'abc');
ERROR: invalid XML document
-DETAIL: Start tag expected, '<' not found.
+DETAIL: Entity: line 1: parser error : Start tag expected, '<' not found
+abc
+^
SELECT xmlparse(document '<abc>x</abc>');
xmlparse
--------------
@@ -273,7 +279,9 @@ SELECT xml 'abc' IS NOT DOCUMENT;
SELECT '<>' IS NOT DOCUMENT;
ERROR: invalid XML content
-DETAIL: Element name not found
+DETAIL: Entity: line 1: parser error : StartTag: invalid element name
+<>
+ ^
SELECT xmlagg(data) FROM xmltest;
xmlagg
--------------------------------------