RE: CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior

Поиск
Список
Период
Сортировка
От Regina Obe
Тема RE: CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior
Дата
Msg-id 000801d4caf5$6a129cf0$3e37d6d0$@pcorp.us
обсуждение исходный текст
Ответ на Re: CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior  (Robert Haas <robertmhaas@gmail.com>)
Re: CTE Changes in PostgreSQL 12, can we have a GUC to get oldbehavior  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
> I think there are probably other ways of fixing this query that won't have
> such dramatic effects; it doesn't really seem to need to use WITH, and I bet
> you could also tweak the WITH query to prevent inlining.

Yes I know I can change THIS QUERY.  I've changed other ones to work around this.
Normally I just use a LATERAL for this.

My point is lots of people use CTEs intentionally for this kind of thing because they know they are materialized.

It's going to make a lot of people hesitant to upgrade if they think they need to revisit every CTE (that they
intentionallywrote cause they thought it would be materialized) to throw in a MATERIALIZED keyword. 

> I also think
> Andres's question about why this gets inlined in the first place is a good one;
> the (m).* seems like it ought to be counted as a multiple reference.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL
> Company
Well if we can at least prevent the multiple reference thing from inlining that might be good enough to solve most
performanceregression issues that arise. 

Thanks,
Regina






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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: oddity with ALTER ROLE/USER
Следующее
От: Robert Haas
Дата:
Сообщение: Re: CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior