Github user linwen commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1087#discussion_r96171062
--- Diff: src/backend/catalog/aclchk.c ---
@@ -2670,28 +2670,50 @@ List *getActionName(AclMode mask)
bool fallBackToNativeCheck(AclObjectKind objkind, Oid obj_oid, Oid roleid)
{
//for heap table, we fall back to native check.
- if(objkind == ACL_KIND_CLASS)
+ if (objkind == ACL_KIND_CLASS)
{
char relstorage = get_rel_relstorage(obj_oid);
- if(relstorage == 'h')
+ if (relstorage == 'h')
{
return true;
}
}
+ else if (objkind == ACL_KIND_NAMESPACE)
+ {
+ //native check build-in schemas.
+ if (obj_oid == PG_CATALOG_NAMESPACE || obj_oid ==
PG_INFORMATION_SCHEMA_NAMESPACE
+ || obj_oid == PG_AOSEGMENT_NAMESPACE || obj_oid ==
PG_TOAST_NAMESPACE
+ || obj_oid == PG_BITMAPINDEX_NAMESPACE)
+ {
+ return true;
+ }
+ }
+ else if (objkind == ACL_KIND_PROC)
+ {
+ //native check functions under build-in schemas.
--- End diff --
should use this kind of comments: /* */ and fix indent.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---