diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-04-26 14:17:13 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-04-26 14:17:44 -0400 |
| commit | 7c85aa39fc08df44e1ce67e651bda4cf7e331580 (patch) | |
| tree | 52701e88af63dd95acc3f1d9246929acbab03a5e /src/test/regress/sql/create_index.sql | |
| parent | ba3e4157a7d0c7e963a8b800a30b9789aea6dd96 (diff) | |
| download | postgresql-7c85aa39fc08df44e1ce67e651bda4cf7e331580.tar.gz | |
Fix oversight in recent parameterized-path patch.
bitmap_scan_cost_est() has to be able to cope with a BitmapOrPath, but
I'd taken a shortcut that didn't work for that case. Noted by Heikki.
Add some regression tests since this area is evidently under-covered.
Diffstat (limited to 'src/test/regress/sql/create_index.sql')
| -rw-r--r-- | src/test/regress/sql/create_index.sql | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql index 62d05d0605..f8edb7ee76 100644 --- a/src/test/regress/sql/create_index.sql +++ b/src/test/regress/sql/create_index.sql @@ -859,6 +859,22 @@ RESET enable_bitmapscan; DROP TABLE onek_with_null; -- +-- Check bitmap index path planning +-- + +EXPLAIN (COSTS OFF) +SELECT * FROM tenk1 + WHERE thousand = 42 AND (tenthous = 1 OR tenthous = 3 OR tenthous = 42); +SELECT * FROM tenk1 + WHERE thousand = 42 AND (tenthous = 1 OR tenthous = 3 OR tenthous = 42); + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM tenk1 + WHERE hundred = 42 AND (thousand = 42 OR thousand = 99); +SELECT count(*) FROM tenk1 + WHERE hundred = 42 AND (thousand = 42 OR thousand = 99); + +-- -- Check behavior with duplicate index column contents -- |
