Table Of Contents

6.11. Grant

6.11.1. Synopsis

GRANT <privileges>

  ON { <entries> | <find_expression> }

  TO <grantees>

find_expression ::=
  FIND ( { <type_expression> | <tag_expression> | NOT <tag_expression> } [ AND ... ] )

6.11.2. Description

GRANT will grant the specified privileges on the entries listed to the grantees listed.

6.11.3. Parameters

privileges

The name of the entries for which the privileges should be granted. The privileges will be merged with previously specified privileges for the entry. If no previous privileges are specified for that entry, then the default privileges of the user will be merged with the granted privileges.

entries

The name of the entries to modify privileges.

grantees

The list of grantees to grant privileges to.

6.11.4. Examples

In the following examples, Alice and Bob have the SELECT default privileges.

Grant to the user Alice the SELECT privilege on a table:

GRANT SELECT ON table1 TO Alice

Since Alice had already the SELECT default privilege, Alice will not gain any additional privilege on table1.

Grant to the user Bob the INSERT privilege on two tables:

GRANT INSERT ON table1, table2 TO Bob

Since Bob had the SELECT default privilege, Bob can now SELECT and INSERT on table1 and table2.

arrow_backPrevious
6.10. Key/value lookups
Next arrow_forward
6.12. Revoke