From 105e6ccb685aadbf1319521c5c6f750f85b5b5dd Mon Sep 17 00:00:00 2001 From: chenlinfeng3 <1377682907@qq.com> Date: Wed, 29 Jul 2020 10:27:41 +0800 Subject: [PATCH] bugfix: change kernel to support some third-party extensions --- src/gausskernel/process/tcop/utility.cpp | 36 ------------------------ 1 file changed, 36 deletions(-) diff --git a/src/gausskernel/process/tcop/utility.cpp b/src/gausskernel/process/tcop/utility.cpp index 9bff43886..ed3bbd01a 100755 --- a/src/gausskernel/process/tcop/utility.cpp +++ b/src/gausskernel/process/tcop/utility.cpp @@ -3586,9 +3586,6 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi } break; case T_AlterDomainStmt: -#ifdef PGXC - ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported."))); -#endif /* PGXC */ { AlterDomainStmt* stmt = (AlterDomainStmt*)parse_tree; @@ -4240,10 +4237,6 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi } break; case T_RuleStmt: /* CREATE RULE */ -#ifdef PGXC - if (!IsInitdb && !u_sess->attr.attr_sql.enable_cluster_resize && !u_sess->exec_cxt.extension_is_valid) - ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("RULE is not yet supported."))); -#endif /* PGXC */ DefineRule((RuleStmt*)parse_tree, query_string); #ifdef PGXC if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) { @@ -4927,10 +4920,6 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi * ******************************** DOMAIN statements **** */ case T_CreateDomainStmt: -#ifdef PGXC - if (!IsInitdb && !u_sess->attr.attr_common.IsInplaceUpgrade) - ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported."))); -#endif /* PGXC */ DefineDomain((CreateDomainStmt*)parse_tree); #ifdef PGXC if (IS_PGXC_COORDINATOR) @@ -8531,9 +8520,6 @@ void CheckObjectInBlackList(ObjectType obj_type, const char* query_string) return; else break; - case OBJECT_AGGREGATE: - tag = "AGGREGATE"; - break; case OBJECT_OPERATOR: tag = "OPERATOR"; break; @@ -8596,28 +8582,6 @@ void CheckObjectInBlackList(ObjectType obj_type, const char* query_string) */ bool CheckExtensionInWhiteList(const char* extension_name, uint32 hash_value, bool hash_check) { - /* 2902411162 hash for fastcheck, the sql file is much shorter than published version. */ - uint32 postgisHashHistory[POSTGIS_VERSION_NUM] = {2902411162, 2959454932}; - - /* check for extension name */ - if (pg_strcasecmp(extension_name, "postgis") == 0) { - /* PostGIS is disabled under 300 deployment */ - if (is_feature_disabled(POSTGIS_DOCKING)) { - return false; - } - - if (hash_check && !isSecurityMode) { - /* check for postgis hashvalue */ - for (int i = 0; i < POSTGIS_VERSION_NUM; i++) { - if (hash_value == postgisHashHistory[i]) { - return true; - } - } - } else { - return true; - } - } - return true; }