!3506 【bugfixed】增加对 file_fdw 扩展的删除限制,与文档保持一致

Merge pull request !3506 from laishenghao/file-fdw
This commit is contained in:
opengauss-bot
2023-06-01 06:08:17 +00:00
committed by Gitee
3 changed files with 14 additions and 0 deletions

View File

@ -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.")));

View File

@ -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.

View File

@ -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;