Skip to content

Commit 872101b

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 b2ccb5f commit 872101b

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
@@ -4336,6 +4336,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets)
43364336
case ATT_TABLE | ATT_VIEW:
43374337
msg = _("\"%s\" is not a table or view");
43384338
break;
4339+
case ATT_TABLE | ATT_VIEW | ATT_FOREIGN_TABLE:
4340+
msg = _("\"%s\" is not a table, view or foreign table");
4341+
break;
43394342
case ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX:
43404343
msg = _("\"%s\" is not a table, view, materialized view, or index");
43414344
break;
@@ -4345,6 +4348,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets)
43454348
case ATT_TABLE | ATT_MATVIEW | ATT_INDEX:
43464349
msg = _("\"%s\" is not a table, materialized view, or index");
43474350
break;
4351+
case ATT_TABLE | ATT_MATVIEW | ATT_FOREIGN_TABLE:
4352+
msg = _("\"%s\" is not a table, materialized view, or foreign table");
4353+
break;
43484354
case ATT_TABLE | ATT_FOREIGN_TABLE:
43494355
msg = _("\"%s\" is not a table or foreign table");
43504356
break;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy