ALTER CAPTURE PRIVILEGE POLICY v16

EDB Postgres Advanced Server includes extra syntax not offered by Oracle with the ALTER CAPTURE PRIVILEGES POLICY SQL command.

Name

ALTER CAPTURE PRIVILEGES POLICY Allows a superuser or a user with CAPTURE_ADMIN role to modify the attributes of the capture privilege poilicy.

Synopsis

This command is available in five forms.

ALTER CAPTURE PRIVILEGES POLICY <name> SET WHERE ( <expression> )

ALTER CAPTURE PRIVILEGES POLICY <name> DROP WHERE

ALTER CAPTURE PRIVILEGES POLICY <name> SET { ROLE | USER } <role_names>

ALTER CAPTURE PRIVILEGES POLICY <name> DROP { ROLE | USER }

ALTER CAPTURE PRIVILEGES POLICY <name> { ENABLE | DISABLE } [ <run_name> ]

Description

The ALTER CAPTURE PRIVILEGES POLICY command allows a database superuser or any user with the system-defined CAPTURE_ADMIN privilege to a policy in the database.

Use DROP CAPTURE PRIVILEGES POLICY to remove a capture policy.

Parameters

name

The name optionally schema-qualified of the capture privilege policy to alter.

expression

Boolean expression containing up to 4000 characters.

role_names

The roles whose privileges are to be analyzed.

run_name

Name of the capture run.

Examples

This command alters the attributes of a capture privilege policy:

## Enable and disable policy on the database
ALTER CAPTURE PRIVILEGES POLICY sampledb_p1 ENABLE sampledb_run1;
ALTER CAPTURE PRIVILEGES POLICY sampledb_p1 DISABLE;

## Enable and disable policy on the role
ALTER CAPTURE PRIVILEGES POLICY sampledb_p2 ENABLE sampledb_role_run1;
ALTER CAPTURE PRIVILEGES POLICY sampledb_p2 DISABLE sampledb_role_run1;

See also

CREATE CAPTURE PRIVILEGE POLICY, DROP CAPTURE PRIVILEGE POLICY