GRANT (Library)
Grants privileges on a library to a database user or role. Only the superuser can grant privileges to a library. To execute functions inside the library, a user must have separate EXECUTE privileges for those functions.
For example, when working with the Connector Framework Service you may 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 { USAGE | ALL } ON LIBRARY [ [ db-name.]schema.]library-name [, ...] TO { username | role | PUBLIC } [, ...]
Parameters
{ USAGE | ALL } |
The type of privilege to grant on the library, valid values are:
|
[[ db-name.]schema-name.] |
Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example: myschema.thisDbObject |
library-name |
The library on which to grant the privilege. If using more than one schema, you must specify the schema that where the library resides. |
{ username | role | PUBLIC } [,...] |
The recipient of the privileges, valid values are:
|
Example
The following command grants USAGE privileges on the idolLib
library in the v_idol schema to user1:
=> GRANT USAGE ON LIBRARY v_idol.IdolLib TO user1;