mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +03:00
Add a regression test to catch future silliness in the index-building
area...
This commit is contained in:
@@ -95,3 +95,10 @@ INSERT INTO func_index_heap VALUES('ABCD', 'EF');
|
|||||||
ERROR: Cannot insert a duplicate key into unique index func_index_index
|
ERROR: Cannot insert a duplicate key into unique index func_index_index
|
||||||
-- but this shouldn't:
|
-- but this shouldn't:
|
||||||
INSERT INTO func_index_heap VALUES('QWERTY');
|
INSERT INTO func_index_heap VALUES('QWERTY');
|
||||||
|
--
|
||||||
|
-- Also try building functional, expressional, and partial indexes on
|
||||||
|
-- tables that already contain data.
|
||||||
|
--
|
||||||
|
create unique index hash_f8_index_1 on hash_f8_heap(abs(random));
|
||||||
|
create unique index hash_f8_index_2 on hash_f8_heap((seqno + 1), random);
|
||||||
|
create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000;
|
||||||
|
@@ -120,3 +120,11 @@ INSERT INTO func_index_heap VALUES('QWE','RTY');
|
|||||||
INSERT INTO func_index_heap VALUES('ABCD', 'EF');
|
INSERT INTO func_index_heap VALUES('ABCD', 'EF');
|
||||||
-- but this shouldn't:
|
-- but this shouldn't:
|
||||||
INSERT INTO func_index_heap VALUES('QWERTY');
|
INSERT INTO func_index_heap VALUES('QWERTY');
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Also try building functional, expressional, and partial indexes on
|
||||||
|
-- tables that already contain data.
|
||||||
|
--
|
||||||
|
create unique index hash_f8_index_1 on hash_f8_heap(abs(random));
|
||||||
|
create unique index hash_f8_index_2 on hash_f8_heap((seqno + 1), random);
|
||||||
|
create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000;
|
||||||
|
Reference in New Issue
Block a user