mirror of
https://github.com/postgres/postgres.git
synced 2025-12-16 16:42:29 +03:00
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.
This commit is contained in:
@@ -858,6 +858,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
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user