GRANT (Library)
Grants privileges on one or more libraries to users and roles.
For example, when working with the Connector Framework Service, you might need to grant a user usage privileges to a library to be able to set UDSession parameters. For more information see Implementing CFS.
Syntax
GRANT privilege ON LIBRARY [[database.]schema.]library[,...] TO grantee[,...] [ WITH GRANT OPTION ]
Arguments
privilege | Privilege to grant, one of:
You can qualify
To execute functions inside the library, users must also have separate |
[database.]schema
|
Database and schema. The default schema is |
library |
The target library. |
grantee |
Specifies who is granted privileges, one of the following: |
WITH GRANT OPTION
|
Gives grantee the privilege to grant the same privileges to other users or roles, and also revoke them. For details, see Granting Privileges. |
Privileges
Non-superusers require USAGE on the schema and one of the following:
- Owner
- Privileges grantee given the option (
WITH GRANT OPTION
) of granting privileges to other users or roles.
Example
Grant USAGE privileges on the MyFunctions
library to Fred
:
=> GRANT USAGE ON LIBRARY MyFunctions TO Fred;