Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf970a0

Browse files
committed
Fix backwards logic in previous commit.
I wrote this code before committing it, but managed not to include it inthe actual commit.
1 parent1489e2f commitdf970a0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9947,11 +9947,6 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
99479947
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
99489948
errmsg("\"%s\" is not a composite type",rv->relname)));
99499949

9950-
if (reltype==OBJECT_FOREIGN_TABLE&&relkind!=RELKIND_FOREIGN_TABLE)
9951-
ereport(ERROR,
9952-
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
9953-
errmsg("\"%s\" is not a foreign table",rv->relname)));
9954-
99559950
if (reltype==OBJECT_INDEX&&relkind!=RELKIND_INDEX
99569951
&& !IsA(stmt,RenameStmt))
99579952
ereport(ERROR,
@@ -9968,6 +9963,12 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
99689963
errmsg("\"%s\" is a composite type",rv->relname),
99699964
errhint("Use ALTER TYPE instead.")));
99709965

9966+
if (reltype!=OBJECT_FOREIGN_TABLE&&relkind==RELKIND_FOREIGN_TABLE)
9967+
ereport(ERROR,
9968+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
9969+
errmsg("\"%s\" is a foreign table",rv->relname),
9970+
errhint("Use ALTER FOREIGN TABLE instead.")));
9971+
99719972
/*
99729973
* Don't allow ALTER TABLE .. SET SCHEMA on relations that can't be
99739974
* moved to a different schema, such as indexes and TOAST tables.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp