增加对 file_fdw 扩展的删除限制,与文档保持一致
This commit is contained in:
@ -116,6 +116,11 @@ static void DropExtensionInListIsSupported(List* objname)
|
||||
}
|
||||
}
|
||||
|
||||
if (pg_strcasecmp(name, "file_fdw") == 0 && !u_sess->attr.attr_common.IsInplaceUpgrade) {
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("EXTENSION file_fdw does not allow to drop.")));
|
||||
}
|
||||
|
||||
/* Enable DROP operation of the above objects during inplace upgrade or support_extended_features is true */
|
||||
if (!u_sess->attr.attr_common.IsInplaceUpgrade && !g_instance.attr.attr_common.support_extended_features) {
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("EXTENSION is not yet supported.")));
|
||||
|
@ -233,3 +233,8 @@ ERROR: table "test_exists" does not exist
|
||||
-- drop the database
|
||||
DROP DATABASE if exists abc123_123ABCxar;
|
||||
NOTICE: database "abc123_123abcxar" does not exist, skipping
|
||||
-- drop extension
|
||||
drop extension file_fdw;
|
||||
ERROR: EXTENSION file_fdw does not allow to drop.
|
||||
drop extension file_fdw cascade;
|
||||
ERROR: EXTENSION file_fdw does not allow to drop.
|
||||
|
@ -230,3 +230,7 @@ DROP TABLE test_exists;
|
||||
|
||||
-- drop the database
|
||||
DROP DATABASE if exists abc123_123ABCxar;
|
||||
|
||||
-- drop extension
|
||||
drop extension file_fdw;
|
||||
drop extension file_fdw cascade;
|
||||
|
Reference in New Issue
Block a user