diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-10-22 17:00:53 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-10-22 17:00:53 -0400 |
commit | 872101bede26444324059ba0f27c3b1c8b8140f6 (patch) | |
tree | 2360603af0c3a79251e4709bd2044a3d19e0ff49 /src/backend/commands/tablecmds.c | |
parent | b2ccb5f4e6c81305386edb34daf7d1d1e1ee112a (diff) | |
download | postgresql-872101bede26444324059ba0f27c3b1c8b8140f6.tar.gz postgresql-872101bede26444324059ba0f27c3b1c8b8140f6.zip |
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
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 403582ccd53..a5bc508e15d 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -4336,6 +4336,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets) case ATT_TABLE | ATT_VIEW: msg = _("\"%s\" is not a table or view"); 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: msg = _("\"%s\" is not a table, view, materialized view, or index"); break; @@ -4345,6 +4348,9 @@ ATWrongRelkindError(Relation rel, int allowed_targets) case ATT_TABLE | ATT_MATVIEW | ATT_INDEX: msg = _("\"%s\" is not a table, materialized view, or index"); 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: msg = _("\"%s\" is not a table or foreign table"); break; |