Commit 3f78b171 authored by Kevin Grittner's avatar Kevin Grittner

Don't allow ALTER MATERIALIZED VIEW ADD UNIQUE.

Was accidentally allowed, but not documented and lacked support
for rename or drop once created.

Per report from Noah Misch.
parent 62e28b3e
...@@ -3035,7 +3035,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, ...@@ -3035,7 +3035,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd,
pass = AT_PASS_DROP; pass = AT_PASS_DROP;
break; break;
case AT_AddIndex: /* ADD INDEX */ case AT_AddIndex: /* ADD INDEX */
ATSimplePermissions(rel, ATT_TABLE | ATT_MATVIEW); ATSimplePermissions(rel, ATT_TABLE);
/* This command never recurses */ /* This command never recurses */
/* No command-specific prep needed */ /* No command-specific prep needed */
pass = AT_PASS_ADD_INDEX; pass = AT_PASS_ADD_INDEX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment