summaryrefslogtreecommitdiff
path: root/src/test/regress/sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-06-13 21:57:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-06-13 21:57:28 +0000
commit950d047ec5913de0ff6f3badf636667926df0387 (patch)
tree3d97eae31381690a3af2d7321112e74649875cde /src/test/regress/sql
parent0e338bba42df2ec25d4507613c14ded7269a5db8 (diff)
downloadpostgresql-950d047ec5913de0ff6f3badf636667926df0387.tar.gz
Give inet/cidr datatypes their own hash function that ignores the inet vs
cidr type bit, the same as network_eq does. This is needed for hash joins and hash aggregation to work correctly on these types. Per bug report from Michael Fuhr, 2004-04-13. Also, improve hash function for int8 as suggested by Greg Stark.
Diffstat (limited to 'src/test/regress/sql')
-rw-r--r--src/test/regress/sql/opr_sanity.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql
index cf274dd7dc..9c17a0cd3e 100644
--- a/src/test/regress/sql/opr_sanity.sql
+++ b/src/test/regress/sql/opr_sanity.sql
@@ -409,6 +409,13 @@ WHERE p1.oprcanhash AND NOT EXISTS
WHERE opcamid = (SELECT oid FROM pg_am WHERE amname = 'hash') AND
amopopr = p1.oid);
+-- And the converse.
+
+SELECT p1.oid, p1.oprname, op.opcname
+FROM pg_operator AS p1, pg_opclass op, pg_amop p
+WHERE amopopr = p1.oid AND amopclaid = op.oid
+ AND opcamid = (SELECT oid FROM pg_am WHERE amname = 'hash')
+ AND NOT p1.oprcanhash;
-- Check that each operator defined in pg_operator matches its oprcode entry
-- in pg_proc. Easiest to do this separately for each oprkind.