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

From Elvis Pranskevichus
Subject WITH NOT MATERIALIZED and DML CTEs
Date
Msg-id 7542836.7399EEAcVK@hammer.magicstack.net
Whole thread Raw
Responses Re: WITH NOT MATERIALIZED and DML CTEs
Re: WITH NOT MATERIALIZED and DML CTEs
List pgsql-hackers
Currently, WITH a AS NOT MATERIALIZED (INSERT ...) would silently 
disregard the "NOT MATERIALIZED" instruction and execute the data-
modifying CTE to completion (as per the long-standing DML CTE rule).

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.

It is understandably late in the 12 cycle, so maybe prohibit NOT 
MATERIALIZED with DML altogheter and revisit this in 13?

Thoughts?

                               Elvis
 






pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dead stores in src/common/sha2.c
Next
From: Andres Freund
Date:
Subject: Re: WITH NOT MATERIALIZED and DML CTEs