Functions to check redwood specific privileges v18

Here are the functions to check whether a role has redwood specific privileges:

This function checks if the provided user has the necessary privilege to create a private database link. It takes the intended name of the database link as an argument.

  • Provide the name of the user (as a string).
  • Function returns true if the provided user has CREATE DATABASE LINK privilege; otherwise, it returns false.

This function checks if the provided user has the necessary privilege to create a private database link. It takes the intended Object Identifier (OID) of the database link as an argument.

  • Provide the OID of the user.
  • Function returns true if the provided user has CREATE DATABASE LINK privilege; otherwise, it returns false.

This function checks if the provided user has the privilege to create a public database link, which is a link accessible to all users. It takes the intended name of the database link as an argument.

  • Provide the name of the user (as a string).
  • Function returns true if the provided user has CREATE PUBLIC DATABASE LINK privilege; otherwise, it returns false.

This function checks if the provided user has the privilege to create a public database link. It takes the intended Object Identifier (OID) of the database link as an argument.

  • Provide the OID of the user.
  • Function returns true if the provided user has CREATE PUBLIC DATABASE LINK privilege; otherwise, it returns false.

This function checks if the provided user has the ALTER DATABASE LINK privilege on a private database link, identified by its name.

  • Provide the name of the user (as a string).
  • Function returns true if the provided user can alter the specified private database link; otherwise, it returns false.

This function checks if the provided user has the ALTER DATABASE LINK privilege on a private database link, identified by its Object Identifier (OID).

  • Provide OID of the user.
  • Function returns true if the provided user can alter the specified private database link; otherwise, it returns false.

This function checks if the provided user has the ALTER PUBLIC DATABASE LINK privilege on a public database link, identified by its name.

  • Provide the name of the user (as a string).
  • Function returns true if the provided user can alter the specified public database link; otherwise, it returns false.

This function checks if the provided user has the ALTER PUBLIC DATABASE LINK privilege on a public database link, identified by its Object Identifier (OID).

  • Provide the OID of the user.
  • Function returns true if the provided user can alter the specified public database link; otherwise, it returns false.

This function checks if the provided user has the ALTER PUBLIC DATABASE LINK privilege on a public database link, identified by its Object Identifier (OID).

  • Provide the OID of the user.
  • Function returns true if the provided user can alter the specified public database link; otherwise, it returns false.

This function checks if the provided user has the ALTER PUBLIC DATABASE LINK privilege on a public database link, identified by its Object Identifier (OID).

  • Provide the OID of the user.
  • Function returns true if the provided user can alter the specified public database link; otherwise, it returns false.

This function checks if the provided user has the necessary privilege to drop a public database link. It takes the name of the link as an argument.

  • Provide the name of the user (as a string).
  • Function returns true if the provided user has DROP PUBLIC DATABASE LINK privilege; otherwise, it returns false.

This function checks if the provided user has the necessary privilege to drop a public database link. It takes the Object Identifier (OID) of the link as an argument.

  • Provide the OID of the user.
  • Function returns true if the provided user has DROP PUBLIC DATABASE LINK privilege; otherwise, it returns false.

has_exemptaccesspolicy_privilege(name)

This function checks if the provided user has the EXEMPT ACCESS POLICY privilege for a specific role. This privilege allows the user to bypass Row-Level Security (RLS) policies.

  • Provide the name of the role (as a string).
  • Function returns true if the provided user has the EXEMPT ACCESS POLICY privilege for the specified role; otherwise, it returns false.

has_exemptaccesspolicy_privilege(oid)

This function checks if the provided user has the EXEMPT ACCESS POLICY privilege for a specific role. This privilege allows the user to bypass Row-Level Security (RLS) policies. It takes the Object Identifier (OID) of the role as an argument.

  • Provide the OID of the role.
  • Function returns true if the provided user has the EXEMPT ACCESS POLICY privilege for the specified role; otherwise, it returns false.