Add a regression test to catch future silliness in the index-building
authorTom Lane
Thu, 29 May 2003 01:09:13 +0000 (01:09 +0000)
committerTom Lane
Thu, 29 May 2003 01:09:13 +0000 (01:09 +0000)
area...

src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql

index d82ed8c4e8931504ef21d3dd7b3d4a28db55ad43..81e9672b05ea3a05ae8759998cb8d7b2fc3971be 100644 (file)
@@ -95,3 +95,10 @@ INSERT INTO func_index_heap VALUES('ABCD', 'EF');
 ERROR:  Cannot insert a duplicate key into unique index func_index_index
 -- but this shouldn't:
 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;
index 383a7a1a9f926d9d9c678fc30cbd2dceb8ab7f96..8400a3bb3334ad8b096a57c0eb5a85a6e4a63496 100644 (file)
@@ -120,3 +120,11 @@ INSERT INTO func_index_heap VALUES('QWE','RTY');
 INSERT INTO func_index_heap VALUES('ABCD', 'EF');
 -- but this shouldn't:
 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;