Github user huor commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1384#discussion_r208435758
--- Diff: src/backend/commands/tablecmds.c ---
@@ -1105,53 +1340,70 @@ DefineExternalRelation(CreateExternalStmt
*createExtStmt)
char* protname =
uri->customprotocol;
Oid ptcId =
LookupExtProtocolOid(protname, false);
AclResult aclresult;
-
+
/* Check we have the right permissions
on this protocol */
if (!pg_extprotocol_ownercheck(ptcId,
ownerId))
- {
+ {
AclMode mode = (iswritable ?
ACL_INSERT : ACL_SELECT);
-
+
aclresult =
pg_extprotocol_aclcheck(ptcId, ownerId, mode);
-
+
if (aclresult != ACLCHECK_OK)
aclcheck_error(aclresult, ACL_KIND_EXTPROTOCOL, protname);
}
}
+ /* magma follow the same ack check as HDFS */
+ else if (uri->protocol == URI_HDFS ||
uri->protocol == URI_MAGMA)
--- End diff --
No magma
---