summaryrefslogtreecommitdiff
path: root/src/test/regress/sql/opr_sanity.sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-01-26 02:35:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-01-26 02:35:51 +0000
commit8d8bf127605d0a87b22bb07e630a075506ca5e1e (patch)
tree3ad06ce423081f23df826753da0dc7f998e58822 /src/test/regress/sql/opr_sanity.sql
parent5997386a0a38f3ded28ce6eb2c2b4f110b377e46 (diff)
downloadpostgresql-8d8bf127605d0a87b22bb07e630a075506ca5e1e.tar.gz
Clean up the INET-vs-CIDR situation. Get rid of the internal is_cidr flag
and rely exclusively on the SQL type system to tell the difference between the types. Prevent creation of invalid CIDR values via casting from INET or set_masklen() --- both of these operations now silently zero any bits to the right of the netmask. Remove duplicate CIDR comparison operators, letting the type rely on the INET operators instead.
Diffstat (limited to 'src/test/regress/sql/opr_sanity.sql')
-rw-r--r--src/test/regress/sql/opr_sanity.sql3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql
index ea5bc5b436..0528e3657c 100644
--- a/src/test/regress/sql/opr_sanity.sql
+++ b/src/test/regress/sql/opr_sanity.sql
@@ -223,6 +223,9 @@ WHERE c.castfunc = p.oid AND
-- As of 7.4, this finds the casts from text and varchar to bpchar, because
-- 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().
+
SELECT *
FROM pg_cast c
WHERE c.castfunc = 0 AND