Content-Length: 279833 | pFad | http://github.com/postgrespro/postgres_cluster/commit/872101bede26444324059ba0f27c3b1c8b8140f6

AD Add two missing cases to ATWrongRelkindError. · postgrespro/postgres_cluster@872101b · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/872101bede26444324059ba0f27c3b1c8b8140f6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy