mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Forward-patch regression test for "could not find pathkey item to sort".
Commit a87c729153
already fixed the bug this
is checking for, but the regression test case it added didn't cover this
scenario. Since we managed to miss the fact that there was a bug at all,
it seems like a good idea to propagate the extra test case forward to HEAD.
This commit is contained in:
parent
de42ed401a
commit
344eed91e9
@ -551,6 +551,28 @@ explain (costs off)
|
||||
reset enable_seqscan;
|
||||
reset enable_indexscan;
|
||||
reset enable_bitmapscan;
|
||||
-- This simpler variant of the above test has been observed to fail differently
|
||||
create table events (event_id int primary key);
|
||||
create table other_events (event_id int primary key);
|
||||
create table events_child () inherits (events);
|
||||
explain (costs off)
|
||||
select event_id
|
||||
from (select event_id from events
|
||||
union all
|
||||
select event_id from other_events) ss
|
||||
order by event_id;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------
|
||||
Merge Append
|
||||
Sort Key: events.event_id
|
||||
-> Index Scan using events_pkey on events
|
||||
-> Sort
|
||||
Sort Key: events_child.event_id
|
||||
-> Seq Scan on events_child
|
||||
-> Index Scan using other_events_pkey on other_events
|
||||
(7 rows)
|
||||
|
||||
drop table events_child, events, other_events;
|
||||
reset enable_indexonlyscan;
|
||||
-- Test constraint exclusion of UNION ALL subqueries
|
||||
explain (costs off)
|
||||
|
@ -229,6 +229,22 @@ explain (costs off)
|
||||
reset enable_seqscan;
|
||||
reset enable_indexscan;
|
||||
reset enable_bitmapscan;
|
||||
|
||||
-- This simpler variant of the above test has been observed to fail differently
|
||||
|
||||
create table events (event_id int primary key);
|
||||
create table other_events (event_id int primary key);
|
||||
create table events_child () inherits (events);
|
||||
|
||||
explain (costs off)
|
||||
select event_id
|
||||
from (select event_id from events
|
||||
union all
|
||||
select event_id from other_events) ss
|
||||
order by event_id;
|
||||
|
||||
drop table events_child, events, other_events;
|
||||
|
||||
reset enable_indexonlyscan;
|
||||
|
||||
-- Test constraint exclusion of UNION ALL subqueries
|
||||
|
Loading…
Reference in New Issue
Block a user