diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-11-19 11:34:54 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-11-19 11:34:54 +0100 |
commit | afaccbba787d5f1470c44ddd61c9ddaaad19e27e (patch) | |
tree | a8b4f87eb17cef6e003d710aa5d7efbfc5118a75 /src | |
parent | 01e658fa74cb7e3292448f6663b549135958003b (diff) | |
download | postgresql-afaccbba787d5f1470c44ddd61c9ddaaad19e27e.tar.gz postgresql-afaccbba787d5f1470c44ddd61c9ddaaad19e27e.zip |
Rename object in test to avoid conflict
In 01e658fa74cb7e3292448f6663b549135958003b, the hash_func test
creates a type t1, but apparently a test running in parallel might
also use that name, depending on timing. Rename the type to avoid the
issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/hash_func.out | 14 | ||||
-rw-r--r-- | src/test/regress/sql/hash_func.sql | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/test/regress/expected/hash_func.out b/src/test/regress/expected/hash_func.out index daeb3e118dd..827e69fc7ab 100644 --- a/src/test/regress/expected/hash_func.out +++ b/src/test/regress/expected/hash_func.out @@ -305,24 +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); +CREATE TYPE hash_test_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) +FROM (VALUES (row(1, 'aaa')::hash_test_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; +DROP TYPE hash_test_t1; -- record hashing with non-hashable field type -CREATE TYPE t2 AS (a money, b text); +CREATE TYPE hash_test_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); +FROM (VALUES (row(1, 'aaa')::hash_test_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); +FROM (VALUES (row(1, 'aaa')::hash_test_t2)) x(v); ERROR: could not identify an extended hash function for type money -DROP TYPE t2; +DROP TYPE hash_test_t2; diff --git a/src/test/regress/sql/hash_func.sql b/src/test/regress/sql/hash_func.sql index 280b0595834..681cc92ac20 100644 --- a/src/test/regress/sql/hash_func.sql +++ b/src/test/regress/sql/hash_func.sql @@ -227,19 +227,19 @@ FROM (VALUES (int4range(10, 20)), (int4range(23, 43)), WHERE hash_range(v)::bit(32) != hash_range_extended(v, 0)::bit(32) OR hash_range(v)::bit(32) = hash_range_extended(v, 1)::bit(32); -CREATE TYPE t1 AS (a int, b text); +CREATE TYPE hash_test_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) +FROM (VALUES (row(1, 'aaa')::hash_test_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); -DROP TYPE t1; +DROP TYPE hash_test_t1; -- record hashing with non-hashable field type -CREATE TYPE t2 AS (a money, b text); +CREATE TYPE hash_test_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); +FROM (VALUES (row(1, 'aaa')::hash_test_t2)) x(v); SELECT v as value, hash_record_extended(v, 0)::bit(32) as extended0 -FROM (VALUES (row(1, 'aaa')::t2)) x(v); -DROP TYPE t2; +FROM (VALUES (row(1, 'aaa')::hash_test_t2)) x(v); +DROP TYPE hash_test_t2; |