sraoss / pg_ivm

IVM (Incremental View Maintenance) implementation as a PostgreSQL extension
Other
854 stars 24 forks source link

Add CTE support #47

Closed yugo-n closed 1 year ago

yugo-n commented 1 year ago

Simple CTEs which does not contain aggregates or DISTINCT are now supported similarly to simple sub-queries.

Before a view is maintained, all CTEs are converted to corresponding subqueries to enable to treat CTEs as same as subqueries. For this end, codes of the static fnction inline_cte in the core (optimizer/plan/subselect.c) was imported.

yugo-n commented 1 year ago

Thank you fore your review!