Re: WITH NOT MATERIALIZED and DML CTEs - Mailing list pgsql-hackers

From Elvis Pranskevichus
Subject Re: WITH NOT MATERIALIZED and DML CTEs
Date
Msg-id 1862252.d4nv1szfvR@hammer.magicstack.net
Whole thread Raw
In response to Re: WITH NOT MATERIALIZED and DML CTEs  (Andres Freund <andres@anarazel.de>)
Responses Re: WITH NOT MATERIALIZED and DML CTEs
List pgsql-hackers
On Monday, June 3, 2019 11:50:15 A.M. EDT Andres Freund wrote:
> > This seems like an omission to me.  Ideally, the presence of an
> > explicit "NOT MATERIALIZED" clause on a data-modifying CTE should
> > disable the "run to completion" logic.
> 
> I don't see us ever doing that. The result of minor costing and other
> planner changes would yield different updated data. That'll just
> create endless bug reports.

I understand why the rule exists in the first place, but I think that an 
explicit opt-in signals the assumption of responsibility and opens the 
possibility of using this in a well-defined evaluation context, such as 
CASE WHEN.

                              Elvis





pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: undo: zedstore vs. zheap
Next
From: Robert Haas
Date:
Subject: Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3