PostgreSQL 12 gives the planner more freedom around WITH queries
engineeringpostgresqlplannersqljsonPostgreSQL 12 changes CTE optimization and adds SQL/JSON paths and stored generated columns. Each feature makes a different decision about where expressions execute and when results are retained.