diff options
Diffstat (limited to 'contrib/amcheck/sql/check_btree.sql')
-rw-r--r-- | contrib/amcheck/sql/check_btree.sql | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/amcheck/sql/check_btree.sql b/contrib/amcheck/sql/check_btree.sql index 9a1987598da..a1fef644cb0 100644 --- a/contrib/amcheck/sql/check_btree.sql +++ b/contrib/amcheck/sql/check_btree.sql @@ -13,7 +13,7 @@ INSERT INTO bttest_a SELECT * FROM generate_series(1, 100000); INSERT INTO bttest_b SELECT * FROM generate_series(100000, 1, -1); INSERT INTO bttest_multi SELECT i, i%2 FROM generate_series(1, 100000) as i; -CREATE INDEX bttest_a_idx ON bttest_a USING btree (id); +CREATE INDEX bttest_a_idx ON bttest_a USING btree (id) WITH (deduplicate_items = ON); CREATE INDEX bttest_b_idx ON bttest_b USING btree (id); CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi USING btree (id) INCLUDE (data); @@ -67,6 +67,11 @@ WHERE relation = ANY(ARRAY['bttest_a', 'bttest_a_idx', 'bttest_b', 'bttest_b_idx AND pid = pg_backend_pid(); COMMIT; +-- Deduplication +TRUNCATE bttest_a; +INSERT INTO bttest_a SELECT 42 FROM generate_series(1, 2000); +SELECT bt_index_check('bttest_a_idx', true); + -- normal check outside of xact for index with included columns SELECT bt_index_check('bttest_multi_idx'); -- more expansive tests for index with included columns |