@ -60,7 +60,7 @@ static bool CheckObjectDropPrivilege(ObjectType removeType, Oid objectId)
|
||||
return (aclresult == ACLCHECK_OK) ? true : false;
|
||||
}
|
||||
|
||||
static void DropExtensionIsSupported(List* objname)
|
||||
static void DropExtensionInListIsSupported(List* objname)
|
||||
{
|
||||
static const char *supportList[] = {
|
||||
"postgis",
|
||||
@ -70,6 +70,7 @@ static void DropExtensionIsSupported(List* objname)
|
||||
"oracle_fdw",
|
||||
"postgres_fdw",
|
||||
"dblink",
|
||||
"security_plugin",
|
||||
"db_a_parser",
|
||||
"db_b_parser",
|
||||
"db_c_parser",
|
||||
@ -131,7 +132,7 @@ void RemoveObjects(DropStmt* stmt, bool missing_ok, bool is_securityadmin)
|
||||
does_not_exist_skipping(stmt->removeType, objname, objargs, missing_ok);
|
||||
continue;
|
||||
} else if (stmt->removeType == OBJECT_EXTENSION) {
|
||||
DropExtensionIsSupported(objname);
|
||||
DropExtensionInListIsSupported(objname);
|
||||
}
|
||||
|
||||
TrForbidAccessRbObject(address.classId, address.objectId);
|
||||
|
||||
@ -279,9 +279,6 @@ void CNGPCCleanUpSession()
|
||||
return;
|
||||
}
|
||||
|
||||
if (u_sess->plsql_cxt.plpgsql_HashTable) {
|
||||
plpgsql_HashTableDeleteAll();
|
||||
}
|
||||
DropAllPreparedStatements();
|
||||
/* if in shared memory, delete context. */
|
||||
CachedPlanSource* psrc = u_sess->pcache_cxt.ungpc_saved_plan;
|
||||
|
||||
@ -9756,11 +9756,13 @@ bool DropExtensionIsSupported(const char* query_string)
|
||||
char* lower_string = lowerstr(query_string);
|
||||
|
||||
#ifndef ENABLE_MULTIPLE_NODES
|
||||
if (strstr(lower_string, "drop") && (strstr(lower_string, "postgis") || strstr(lower_string, "packages") ||
|
||||
strstr(lower_string, "mysql_fdw") || strstr(lower_string, "oracle_fdw") ||
|
||||
strstr(lower_string, "postgres_fdw") || strstr(lower_string, "dblink") ||
|
||||
strstr(lower_string, "db_b_parser") || strstr(lower_string, "db_a_parser") ||
|
||||
strstr(lower_string, "db_c_parser") || strstr(lower_string, "db_pg_parser"))) {
|
||||
if (strstr(lower_string, "drop") &&
|
||||
(strstr(lower_string, "postgis") || strstr(lower_string, "packages") ||
|
||||
strstr(lower_string, "mysql_fdw") || strstr(lower_string, "oracle_fdw") ||
|
||||
strstr(lower_string, "postgres_fdw") || strstr(lower_string, "dblink") ||
|
||||
strstr(lower_string, "security_plugin") ||
|
||||
strstr(lower_string, "db_b_parser") || strstr(lower_string, "db_a_parser") ||
|
||||
strstr(lower_string, "db_c_parser") || strstr(lower_string, "db_pg_parser"))) {
|
||||
#else
|
||||
if (strstr(lower_string, "drop") && (strstr(lower_string, "postgis") || strstr(lower_string, "packages"))) {
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user