diff options
Diffstat (limited to 'src/test/regress/sql/create_index.sql')
| -rw-r--r-- | src/test/regress/sql/create_index.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql index babde51d2c..8c60cb6145 100644 --- a/src/test/regress/sql/create_index.sql +++ b/src/test/regress/sql/create_index.sql @@ -804,3 +804,18 @@ RESET enable_indexscan; RESET enable_bitmapscan; DROP TABLE onek_with_null; + +-- +-- Check behavior with duplicate index column contents +-- + +CREATE TABLE dupindexcols AS + SELECT unique1 as id, stringu2::text as f1 FROM tenk1; +CREATE INDEX dupindexcols_i ON dupindexcols (f1, id, f1 text_pattern_ops); +VACUUM ANALYZE dupindexcols; + +EXPLAIN (COSTS OFF) + SELECT count(*) FROM dupindexcols + WHERE f1 > 'LX' and id < 1000 and f1 ~<~ 'YX'; +SELECT count(*) FROM dupindexcols + WHERE f1 > 'LX' and id < 1000 and f1 ~<~ 'YX'; |
