From e2462cdafd8fbdf0a2fb70646d1e28c7889f08c2 Mon Sep 17 00:00:00 2001 From: 08ming <754041231@qq.com> Date: Tue, 24 Sep 2024 19:27:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9timescaledb=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/optimizer/commands/tablecmds.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index fb4965ec0..08f512efd 100755 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -2272,7 +2272,12 @@ ObjectAddress DefineRelation(CreateStmt* stmt, char relkind, Oid ownerId, Object /* Check namespace permissions. */ AclResult aclresult; - aclresult = pg_namespace_aclcheck(namespaceId, ownerId, ACL_CREATE); + if (DB_IS_CMPT(PG_FORMAT) && u_sess->hook_cxt.forTsdbHook) { + aclresult = pg_namespace_aclcheck(namespaceId, GetUserId(), ACL_CREATE); + } else { + aclresult = pg_namespace_aclcheck(namespaceId, ownerId, ACL_CREATE); + } + bool anyResult = false; if (aclresult != ACLCHECK_OK && !IsSysSchema(namespaceId)) { anyResult = CheckRelationCreateAnyPrivilege(ownerId, relkind);