Namespace Scoped Privileges

You can add one or more namespaces to your store, create tables within them, and grant permission for users to access namespaces and tables. You can grant the following permissions to users. See Grant Roles or Privileges in the Security Guide.

System-scoped Privileges:
  • CREATE_ANY_NAMESPACE
  • DROP_ANY_NAMESPACE
Namespace-scoped privileges:
  • CREATE_TABLE_IN_NAMESPACE
  • DROP_TABLE_IN_NAMESPACE
  • EVOLVE_TABLE_IN_NAMESPACE
  • CREATE_INDEX_IN_NAMESPACE
  • DROP_INDEX_IN_NAMESPACE

Note:

The label MODIFY_IN_NAMESPACE can be used as a helper to specify all five namespace-scoped privileges.

Example 3-5 Namespace Scoped Privileges

CREATE NAMESPACE IF NOT EXISTS ns;
GRANT MODIFY_IN_NAMESPACE ON NAMESPACE ns TO usersRole;
CREATE TABLE ns:t (id INTEGER, name STRING, primary key (id));
INSERT INTO ns:t VALUES (1, 'Smith');
SELECT * FROM ns:t;
REVOKE CREATE_TABLE_IN_NAMESPACE ON NAMESPACE ns FROM usersRole;
DROP NAMESPACE ns CASCADE;