CTE inlining
Inlining non-recursive, side-effect-free WITH queries into the outer query, controlled by MATERIALIZED / NOT MATERIALIZED. Introduced in PostgreSQL 12.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
Threads
- [PATCH] Allow subquery pull-up past inlineable CTEs
- BUG #18365: Inconsistent cost function between materialized and non-materialized CTE
- Assert failure in CTE inlining with view and correlated subquery
- Default Inline CTE makes JOIN slower
- Non-Materialized CTE bug?
- BUG #16255: No respect for 'not materialized' on CTEs with group by
- Backport "WITH ... AS MATERIALIZED" syntax to <12?
- WITH NOT MATERIALIZED and DML CTEs
- Early WIP/PoC for inlining CTEs
- CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior
- CTE inlining