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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy