Skip to content

Commit 17b07af

Browse files
committed
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
1 parent ac9a016 commit 17b07af

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/commands/tablecmds.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4339,6 +4339,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets)
43394339
case ATT_TABLE | ATT_VIEW:
43404340
msg = _("\"%s\" is not a table or view");
43414341
break;
4342+
case ATT_TABLE | ATT_VIEW | ATT_FOREIGN_TABLE:
4343+
msg = _("\"%s\" is not a table, view or foreign table");
4344+
break;
43424345
case ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX:
43434346
msg = _("\"%s\" is not a table, view, materialized view, or index");
43444347
break;
@@ -4348,6 +4351,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets)
43484351
case ATT_TABLE | ATT_MATVIEW | ATT_INDEX:
43494352
msg = _("\"%s\" is not a table, materialized view, or index");
43504353
break;
4354+
case ATT_TABLE | ATT_MATVIEW | ATT_FOREIGN_TABLE:
4355+
msg = _("\"%s\" is not a table, materialized view, or foreign table");
4356+
break;
43514357
case ATT_TABLE | ATT_FOREIGN_TABLE:
43524358
msg = _("\"%s\" is not a table or foreign table");
43534359
break;

0 commit comments

Comments
 (0)