Re: incomplete removal of not referenced CTEs

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: incomplete removal of not referenced CTEs
Дата
Msg-id 20160901195800.hkljtbsqgt3okni3@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: incomplete removal of not referenced CTEs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: incomplete removal of not referenced CTEs  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
On 2016-09-01 15:46:45 -0400, Tom Lane wrote:
> Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> > While investigating a CTE-related query, I've noticed that we don't
> > really remove all unreachable CTEs.
> 
> We expend a grand total of three lines of code on making that happen.
> I'm pretty much -1 on adding a great deal more code or complexity
> to make it happen recursively;

Agreed. And the consequences are pretty much harmless.


> the case simply doesn't arise in reasonably well written queries.

Well, it might, when the CTE reference can be removed due to some other
part of the query (e.g. plan time evaluation of immutable function).


Andres



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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: System load consideration before spawning parallel workers
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Speedup twophase transactions