Commit 872101be authored by Robert Haas's avatar Robert Haas

Add two missing cases to ATWrongRelkindError.

This way, we produce a better error message if someone tries to do
something like ALTER INDEX .. ALTER COLUMN .. SET STORAGE.

Amit Langote
parent b2ccb5f4
...@@ -4336,6 +4336,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets) ...@@ -4336,6 +4336,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets)
case ATT_TABLE | ATT_VIEW: case ATT_TABLE | ATT_VIEW:
msg = _("\"%s\" is not a table or view"); msg = _("\"%s\" is not a table or view");
break; break;
case ATT_TABLE | ATT_VIEW | ATT_FOREIGN_TABLE:
msg = _("\"%s\" is not a table, view or foreign table");
break;
case ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX: case ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX:
msg = _("\"%s\" is not a table, view, materialized view, or index"); msg = _("\"%s\" is not a table, view, materialized view, or index");
break; break;
...@@ -4345,6 +4348,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets) ...@@ -4345,6 +4348,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets)
case ATT_TABLE | ATT_MATVIEW | ATT_INDEX: case ATT_TABLE | ATT_MATVIEW | ATT_INDEX:
msg = _("\"%s\" is not a table, materialized view, or index"); msg = _("\"%s\" is not a table, materialized view, or index");
break; break;
case ATT_TABLE | ATT_MATVIEW | ATT_FOREIGN_TABLE:
msg = _("\"%s\" is not a table, materialized view, or foreign table");
break;
case ATT_TABLE | ATT_FOREIGN_TABLE: case ATT_TABLE | ATT_FOREIGN_TABLE:
msg = _("\"%s\" is not a table or foreign table"); msg = _("\"%s\" is not a table or foreign table");
break; break;
......
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