On Mon, Jun 03, 2019 at 11:45:51AM -0400, Elvis Pranskevichus wrote:
> 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 might be worth documenting the fact that NOT MATERIALIZED doesn't
affect DML CTEs, just as it doesn't affect statements with volatile
functions and recursive CTEs.

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


Reply via email to