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. Some error messages are fixed to use "WITH query" instead of "CTE" as same as in the PostgreSQL core code. Also, add tests for nested CTE and multiply-referenced CTE, and a test for nested-subquery in passing. |
||
|---|---|---|
| .. | ||
| create_immv.out | ||
| pg_ivm.out | ||
| refresh_immv.out | ||