disallow explain refresh matview stmt
This commit is contained in:
@ -12817,7 +12817,6 @@ ExplainableStmt:
|
||||
| DeclareCursorStmt
|
||||
| CreateAsStmt
|
||||
| CreateMatViewStmt
|
||||
| RefreshMatViewStmt
|
||||
| ExecuteStmt /* by default all are $$=$1 */
|
||||
;
|
||||
|
||||
|
@ -28,6 +28,11 @@ EXPLAIN (analyze on, costs off)
|
||||
--? Total runtime: .* ms
|
||||
(4 rows)
|
||||
|
||||
EXPLAIN (analyze on, costs off)
|
||||
REFRESH MATERIALIZED VIEW mvtest_tm;
|
||||
ERROR: syntax error at or near "REFRESH"
|
||||
LINE 2: REFRESH MATERIALIZED VIEW mvtest_tm;
|
||||
^
|
||||
SELECT * FROM mvtest_tm ORDER BY type;
|
||||
type | totamt
|
||||
------+--------
|
||||
|
@ -14,6 +14,8 @@ SELECT * FROM mvtest_tv ORDER BY type;
|
||||
-- create a materialized view with no data, and confirm correct behavior
|
||||
EXPLAIN (analyze on, costs off)
|
||||
CREATE MATERIALIZED VIEW mvtest_tm AS SELECT type, sum(amt) AS totamt FROM mvtest_t GROUP BY type WITH NO DATA;
|
||||
EXPLAIN (analyze on, costs off)
|
||||
REFRESH MATERIALIZED VIEW mvtest_tm;
|
||||
SELECT * FROM mvtest_tm ORDER BY type;
|
||||
REFRESH MATERIALIZED VIEW mvtest_tm;
|
||||
ALTER MATERIALIZED VIEW mvtest_tm set (orientation=column); --error
|
||||
|
Reference in New Issue
Block a user