Re: [HACKERS] CTE inlining

Поиск
Список
Период
Сортировка
От Serge Rielau
Тема Re: [HACKERS] CTE inlining
Дата
Msg-id aec1bf28-ded4-4b92-9bd4-6af1f21e394e@rielau.com
обсуждение исходный текст
Ответ на Re: [HACKERS] CTE inlining  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

I haven't been keeping close tabs either, but surely we still have to have
the optimization fence in (at least) all these cases:

* CTE contains INSERT/UPDATE/DELETE
* CTE contains SELECT FOR UPDATE/SHARE (else the set of rows that get
locked might change)
* CTE contains volatile functions

I'm willing to write off cases where, eg, a function should have been
marked volatile and was not. That's user error and there are plenty
of hazards of that kind already. But if the optimizer has reason
to know that discarding the fence might change any query side-effects,
it mustn't.
Yes! +100

Cheers
Serge
 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] CTE inlining
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] json_agg produces nonstandard json