Re: WITH NOT MATERIALIZED and DML CTEs

Поиск
Список
Период
Сортировка
От Elvis Pranskevichus
Тема Re: WITH NOT MATERIALIZED and DML CTEs
Дата
Msg-id 8773800.aLnjnIGtRz@hammer.magicstack.net
обсуждение исходный текст
Ответ на Re: WITH NOT MATERIALIZED and DML CTEs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Monday, June 3, 2019 1:03:44 P.M. EDT Tom Lane wrote:
> CASE is a scalar-expression construct.  It's got little to do with
> the timing of scan/join operations such as row fetches.  We offer
> users essentially no control over when those happen ... other than
> the guarantees about CTE materialization, which are exactly what
> you say you want to give up.

In the general case, yes, but I *can* use a scalar-returning INSERT CTE 
in a THEN clause as a subquery.  Useful for a conditional INSERT, when 
you can't use ON CONFLICT.

Anyway, I understand that the complications are probably not worth it.

Thanks,

                                 Elvis





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fix inconsistencies for v12
Следующее
От: Jesper Pedersen
Дата:
Сообщение: Re: Index Skip Scan