Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY
Дата
Msg-id 3243867.1659563610@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY  (Martijn van Oosterhout <kleptog@gmail.com>)
Список pgsql-bugs
Martijn van Oosterhout <kleptog@gmail.com> writes:
> The part I haven't seen explained is why the generate_series() is
> important. My guess is that if you replace it with an expression it is no
> longer an SRF and it produces some completely different plan that prevents
> the problematic path being triggered.

I think the generate_series() forces a ProjectSet to be put atop the
join, where we'd probably not have done that without it, having made
the bogus assumption that we could evaluate the sort-key SRF at scan
level.  Why that changes the costs enough to mask or not mask the bug
is still obscure.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY
Следующее
От: Richard Guo
Дата:
Сообщение: Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY