OWNERSHIP is never revoked — granting it again transfers it to a new
owner instead, and a single GRANT OWNERSHIP statement names exactly one
subject. The caller must already hold OWNERSHIP on an object to change
any grant on it.
CREATE_MATERIALIZED_VIEW and CREATE_VIEW are separate privileges because
the two objects differ: one stores rows and is refreshed,
the other stores only a query. Granting the ability to create one does not
grant the other.Creating an object you don’t own yet
Creating a database or namespace checks its parent, not itself: one with no owner — because it doesn’t exist yet — falls back toCREATE_DATABASE
on the system, or CREATE_NAMESPACE on its parent namespace, and the
creator becomes its owner. This is what makes creation possible at all, so
holding CREATE_DATABASE is enough to create a table in a database that
has not been created yet.
Granting privileges from SQL
GRANT and REVOKE reach every object in the table above — SYSTEM,
DATABASE, SCHEMA, NAMESPACE <name> [IN <schema>], TABLE, VIEW,
MATERIALIZED VIEW, SECRET, STORAGE INTEGRATION, and FUNCTION —
with the same statement shape. SCHEMA and NAMESPACE both target a
namespace, but aren’t interchangeable spellings: SCHEMA takes a
namespace’s complete path, while NAMESPACE takes one unqualified
component, resolved under an explicit parent (IN <schema>) or the
session’s current namespace when IN is omitted:
OWNERSHIP, SELECT, INSERT, UPDATE and DELETE privileges apply, and
granting one does not reach the non-materialized VIEW beside it.
See GRANT and REVOKE for the full statement syntax,
including every grantee form (
ROLE, USER, GROUP, the ID '<id>'
form) and every status a statement can return, shared by every target
above.
The REST ACL API covers the same objects and reaches further back: it works
against deployments whose SQL surface does not yet expose a given target,
and is the only option for a client that does not speak SQL.
What each Secret operation requires
UPDATE is deliberately separate from USAGE, so a rotation service can
replace a value without being able to bind the Secret to a Function of its
own.
Example: sharing one key
- A platform operator owns the
platformnamespace. They createplatform$openai-prod, then grant theresearchgroupUSAGEon that one Secret. - A researcher in
researchregisters a Function bound toplatform$openai-prod. Binding any other Secret inplatformis refused. - A table owner in
researchadds a column computed by that Function. They holdUSAGEon the Secret through the group, but are refused until they also holdUSAGEon the Function. - Analysts read the resulting column with table access alone — no Function runs on the read path, so they need no grant on the Function or its Secret.
What to read next
Authorization
The access-control model a grant is built from.
Principals
Users, groups, and roles — where each comes from, and how a grant names one.