summaryrefslogtreecommitdiff
path: root/contrib/citext/expected
diff options
context:
space:
mode:
authorTom Lane2018-11-23 18:24:45 +0000
committerTom Lane2018-11-23 18:24:45 +0000
commit48c41fa97480756b70ad095fe8d59199df9b12c7 (patch)
tree7848d85c7e9c39b2edf02b3c0e47622b60a9979a /contrib/citext/expected
parenta314c34079cf06d05265623dd7c056f8fa9d577f (diff)
Add a 64-bit hash function for type citext.
Amul Sul, reviewed by Hironobu Suzuki Discussion: https://postgr.es/m/CAAJ_b947JjnNr9Cp45iNjSqKf6PA5mCTmKsRwPjows93YwQrmw@mail.gmail.com
Diffstat (limited to 'contrib/citext/expected')
-rw-r--r--contrib/citext/expected/citext.out12
-rw-r--r--contrib/citext/expected/citext_1.out12
2 files changed, 24 insertions, 0 deletions
diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 99365c57b0..20890db859 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -222,6 +222,18 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
t
(1 row)
+-- Check the citext_hash() and citext_hash_extended() function explicitly.
+SELECT v as value, citext_hash(v)::bit(32) as standard,
+ citext_hash_extended(v, 0)::bit(32) as extended0,
+ citext_hash_extended(v, 1)::bit(32) as extended1
+FROM (VALUES (NULL::citext), ('PostgreSQL'), ('eIpUEtqmY89'), ('AXKEJBTK'),
+ ('muop28x03'), ('yi3nm0d73')) x(v)
+WHERE citext_hash(v)::bit(32) != citext_hash_extended(v, 0)::bit(32)
+ OR citext_hash(v)::bit(32) = citext_hash_extended(v, 1)::bit(32);
+ value | standard | extended0 | extended1
+-------+----------+-----------+-----------
+(0 rows)
+
-- Do some tests using a table and index.
CREATE TEMP TABLE try (
name citext PRIMARY KEY
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index 8aac72e226..755baad8e2 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -222,6 +222,18 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
t
(1 row)
+-- Check the citext_hash() and citext_hash_extended() function explicitly.
+SELECT v as value, citext_hash(v)::bit(32) as standard,
+ citext_hash_extended(v, 0)::bit(32) as extended0,
+ citext_hash_extended(v, 1)::bit(32) as extended1
+FROM (VALUES (NULL::citext), ('PostgreSQL'), ('eIpUEtqmY89'), ('AXKEJBTK'),
+ ('muop28x03'), ('yi3nm0d73')) x(v)
+WHERE citext_hash(v)::bit(32) != citext_hash_extended(v, 0)::bit(32)
+ OR citext_hash(v)::bit(32) = citext_hash_extended(v, 1)::bit(32);
+ value | standard | extended0 | extended1
+-------+----------+-----------+-----------
+(0 rows)
+
-- Do some tests using a table and index.
CREATE TEMP TABLE try (
name citext PRIMARY KEY