Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d998fac

Browse files
committed
Add a regression test to catch future silliness in the index-building
area...
1 parent f3707d0 commit d998fac

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/test/regress/expected/create_index.out

+7
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,10 @@ INSERT INTO func_index_heap VALUES('ABCD', 'EF');
9595
ERROR: Cannot insert a duplicate key into unique index func_index_index
9696
-- but this shouldn't:
9797
INSERT INTO func_index_heap VALUES('QWERTY');
98+
--
99+
-- Also try building functional, expressional, and partial indexes on
100+
-- tables that already contain data.
101+
--
102+
create unique index hash_f8_index_1 on hash_f8_heap(abs(random));
103+
create unique index hash_f8_index_2 on hash_f8_heap((seqno + 1), random);
104+
create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000;

src/test/regress/sql/create_index.sql

+8
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,11 @@ INSERT INTO func_index_heap VALUES('QWE','RTY');
120120
INSERT INTO func_index_heap VALUES('ABCD', 'EF');
121121
-- but this shouldn't:
122122
INSERT INTO func_index_heap VALUES('QWERTY');
123+
124+
--
125+
-- Also try building functional, expressional, and partial indexes on
126+
-- tables that already contain data.
127+
--
128+
create unique index hash_f8_index_1 on hash_f8_heap(abs(random));
129+
create unique index hash_f8_index_2 on hash_f8_heap((seqno + 1), random);
130+
create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000;

0 commit comments

Comments
 (0)