Manages database link and DBMS_RLS privileges.
PolarDB for PostgreSQL(Compatible with Oracle) provide the syntax of the ALTER ROLE SQL command that is not provided by Oracle. This syntax is useful when you assign privileges of creating and deleting database links that are compatible with Oracle databases, and the DBMS_RLS privilege for fine-grained access control.
CREATE DATABASE LINK
A user who has the CREATE DATABASE LINK
privilege can create a private database link. You can use the following ALTER ROLE
command to grant a role the privilege to create a private database link:
ALTER ROLE role_name
WITH [CREATEDBLINK | CREATE DATABASE LINK]
This command has the same effect as the following command:
GRANT CREATE DATABASE LINK to role_name
You can use the following command to revoke the privilege:
ALTER ROLE role_name
WITH [NOCREATEDBLINK | NO CREATE DATABASE LINK]
CREATEDBLINK
and NOCREATEDBLINK
syntax will be discarded. We recommend that you use the CREATE DATABASE LINK
and NO CREATE DATABASE LINK
syntax.CREATE PUBLIC DATABASE LINK
A user who has the CREATE PUBLIC DATABASE LINK
privilege can create a public database link. You can use the following ALTER ROLE
command to grant a role the privilege to create a public database link:
ALTER ROLE role_name
WITH [CREATEPUBLICDBLINK | CREATE PUBLIC DATABASE LINK]
This command has the same effect as the following command:
GRANT CREATE PUBLIC DATABASE LINK to role_name
You can use the following command to revoke the privilege:
ALTER ROLE role_name
WITH [NOCREATEPUBLICDBLINK | NO CREATE PUBLIC DATABASE LINK]
CREATEPUBLICDBLINK
and NOCREATEPUBLICDBLINK
syntax will be discarded. We recommend that you use the CREATE PUBLIC DATABASE LINK
and NO CREATE PUBLIC DATABASE LINK
syntax.DROP PUBLIC DATABASE LINK
A user who has the DROP PUBLIC DATABASE LINK
privilege can delete a public database link. You can use the following ALTER ROLE
command to grant a role the privilege to delete a public database link:
ALTER ROLE role_name
WITH [DROPPUBLICDBLINK | DROP PUBLIC DATABASE LINK]
This command has the same effect as the following command:
GRANT DROP PUBLIC DATABASE LINK to role_name
You can use the following command to revoke the privilege:
ALTER ROLE role_name
WITH [NODROPPUBLICDBLINK | NO DROP PUBLIC DATABASE LINK]
DROPPUBLICDBLINK
and NODROPPUBLICDBLINK
syntax will be discarded. We recommend that you use the DROP PUBLIC DATABASE LINK
and NO DROP PUBLIC DATABASE LINK
syntax.EXEMPT ACCESS POLICY
A user who has the EXEMPT ACCESS POLICY
privilege is exempt from fine-grained access control (DBMS_RLS
) policies. A user who has the EXEMPT ACCESS POLICY privilege can view or modify any row in a table that is limited by a DBMS_RLS
policy. You can use the following ALTER ROLE
command to grant a role the EXEMPT ACCESS POLICY privilege so that the role is exempt from defined DBMS_RLS
policies.
ALTER ROLE role_name
WITH [POLICYEXEMPT | EXEMPT ACCESS POLICY]
This command has the same effect as the following command:
GRANT EXEMPT ACCESS POLICY TO role_name
You can use the following command to revoke the privilege:
ALTER ROLE role_name
WITH [NOPOLICYEXEMPT | NO EXEMPT ACCESS POLICY]
POLICYEXEMPT
and NOPOLICYEXEMPT
syntax will be discarded. We recommend that you use the EXEMPT ACCESS POLICY
and NO EXEMPT ACCESS POLICY
syntax.