DROP ACCESS POLICY
Removes an access policy from a column or row. If you attempt to run a DROP TABLE statement on a table that contains an access policy, the following message appears:
NOTICE 4927: The AccessPolicy depends on Table tablename ROLLBACK 3128: DROP failed due to dependencies DETAIL: Cannot drop Table tablename because other objects depend on it Projection projection has column column_name as part of its sort order Projection public.p_1 has column column_name as part of its sort order HINT: Use DROP .. CASCADE to drop or modify the dependent objects
Syntax
DROP ACCESS POLICY ON tablename FOR { COLUMN columnname | ROWS};
Parameters
tablename |
The name of the table that contains the column access policy you want to remove. |
columnname |
The name of the column that contains the access policy you want to remove. |
Privileges
You must be a dbadmin user to drop an access policy.
Examples
These examples show various cases where you can drop an access policy.
Drop Column Access Policy from Customer Table for a Specified Column
=> DROP ACCESS POLICY ON customer FOR COLUMN Customer_Number;
Drop Access Policy and Table Using the CASCADE Keyword with DROP TABLE
=> DROP TABLE <tablename> CASCADE;
Drop Row Access Policy on customer_info table
=> DROP ACCESS POLICY ON customer_info FOR ROWS;