diff options
Diffstat (limited to 'src/test/regress/expected/hash_func.out')
| -rw-r--r-- | src/test/regress/expected/hash_func.out | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/regress/expected/hash_func.out b/src/test/regress/expected/hash_func.out index e7d615fde59..daeb3e118dd 100644 --- a/src/test/regress/expected/hash_func.out +++ b/src/test/regress/expected/hash_func.out @@ -305,3 +305,24 @@ WHERE hash_range(v)::bit(32) != hash_range_extended(v, 0)::bit(32) -------+----------+-----------+----------- (0 rows) +CREATE TYPE t1 AS (a int, b text); +SELECT v as value, hash_record(v)::bit(32) as standard, + hash_record_extended(v, 0)::bit(32) as extended0, + hash_record_extended(v, 1)::bit(32) as extended1 +FROM (VALUES (row(1, 'aaa')::t1, row(2, 'bbb'), row(-1, 'ccc'))) x(v) +WHERE hash_record(v)::bit(32) != hash_record_extended(v, 0)::bit(32) + OR hash_record(v)::bit(32) = hash_record_extended(v, 1)::bit(32); + value | standard | extended0 | extended1 +-------+----------+-----------+----------- +(0 rows) + +DROP TYPE t1; +-- record hashing with non-hashable field type +CREATE TYPE t2 AS (a money, b text); +SELECT v as value, hash_record(v)::bit(32) as standard +FROM (VALUES (row(1, 'aaa')::t2)) x(v); +ERROR: could not identify a hash function for type money +SELECT v as value, hash_record_extended(v, 0)::bit(32) as extended0 +FROM (VALUES (row(1, 'aaa')::t2)) x(v); +ERROR: could not identify an extended hash function for type money +DROP TYPE t2; |
