summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2007-11-27 12:21:05 +0000
committerPeter Eisentraut2007-11-27 12:21:05 +0000
commit7888b52076562ba770ccfd863dc3c3c984788703 (patch)
treec6522ca7da2ad7fdd64e8183bae2d94655f01ec2 /src/test
parent542d04e17944f8ceb36fc33061fc83d06efbd999 (diff)
Make casts from xml to text independent of the XML option setting, thus
immutable and indexable. Also fix the volatility settings of some other XML-related functions.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/opr_sanity.out8
-rw-r--r--src/test/regress/sql/opr_sanity.sql4
2 files changed, 11 insertions, 1 deletions
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out
index b4d7d70d59c..ef787115742 100644
--- a/src/test/regress/expected/opr_sanity.out
+++ b/src/test/regress/expected/opr_sanity.out
@@ -288,6 +288,9 @@ WHERE c.castfunc = p.oid AND
-- those are binary-compatible while the reverse way goes through rtrim().
-- As of 8.2, this finds the cast from cidr to inet, because that is a
-- trivial binary coercion while the other way goes through inet_to_cidr().
+-- As of 8.3, this finds the casts from xml to text, varchar, and bpchar,
+-- because those are binary-compatible while the reverse goes through
+-- texttoxml(), which does an XML syntax check.
SELECT *
FROM pg_cast c
WHERE c.castfunc = 0 AND
@@ -300,7 +303,10 @@ WHERE c.castfunc = 0 AND
25 | 1042 | 0 | i
1043 | 1042 | 0 | i
650 | 869 | 0 | i
-(3 rows)
+ 142 | 25 | 0 | a
+ 142 | 1043 | 0 | a
+ 142 | 1042 | 0 | a
+(6 rows)
-- **************** pg_operator ****************
-- Look for illegal values in pg_operator fields.
diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql
index 037eb9e74db..deaa3714fef 100644
--- a/src/test/regress/sql/opr_sanity.sql
+++ b/src/test/regress/sql/opr_sanity.sql
@@ -238,6 +238,10 @@ WHERE c.castfunc = p.oid AND
-- As of 8.2, this finds the cast from cidr to inet, because that is a
-- trivial binary coercion while the other way goes through inet_to_cidr().
+-- As of 8.3, this finds the casts from xml to text, varchar, and bpchar,
+-- because those are binary-compatible while the reverse goes through
+-- texttoxml(), which does an XML syntax check.
+
SELECT *
FROM pg_cast c
WHERE c.castfunc = 0 AND