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 function inline_cte in the core (optimizer/plan/subselect.c) was imported. Prohibit Unreferenced CTE is prohibited. When a table in a unreferenced CTE is TRUNCATEd, the contents of the IMMV is not affected so it must not be truncated. For confirming it at the maintenance time, we have to check if the modified table used in a CTE is actually referenced. Although it would possible, we just disallow to create such IMMVs for now since such unreferenced CTE is useless unless it doesn't contain modifying commands, that is already prohibited.
22 lines
470 B
Makefile
22 lines
470 B
Makefile
# contrib/pg_ivm/Makefile
|
|
|
|
MODULE_big = pg_ivm
|
|
OBJS = \
|
|
$(WIN32RES) \
|
|
createas.o \
|
|
matview.o \
|
|
pg_ivm.o \
|
|
ruleutils.o \
|
|
subselect.o
|
|
PGFILEDESC = "pg_ivm - incremental view maintenance on PostgreSQL"
|
|
|
|
EXTENSION = pg_ivm
|
|
DATA = pg_ivm--1.0.sql \
|
|
pg_ivm--1.0--1.1.sql pg_ivm--1.1--1.2.sql pg_ivm--1.2--1.3.sql \
|
|
pg_ivm--1.3--1.4.sql
|
|
|
|
REGRESS = pg_ivm create_immv refresh_immv
|
|
|
|
PG_CONFIG ?= pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
include $(PGXS)
|