sraoss / pgsql-ivm

IVM (Incremental View Maintenance) development for PostgreSQL
Other
129 stars 12 forks source link

Add support for simple CTEs #111

Closed yugo-n closed 4 years ago

yugo-n commented 4 years 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, inline_cte in optimizer/plan/subselect.c was export to public.

Related issue #8

yugo-n commented 4 years ago

regression tests all pass.