ALTER TABLE and ALTER VIEW commands: Enable drop operation when a row access policy is not set¶
Attention
This behavior change is in the 2023_07 bundle.
For the current status of the bundle, refer to Bundle History.
The ALTER TABLE … DROP ALL ROW ACCESS POLICIES command and ALTER VIEW … DROP ALL ROW ACCESS POLICIES command behave as follows:
- Before the change:
For example, if a row access policy is not set on the table and you try to run an ALTER TABLE … DROP ALL ROW ACCESS POLICIES command, Snowflake returns the following error message:
Any policy of kind ROW_ACCESS_POLICY is not attached to TABLE T1.
- After the change:
If a row access policy is not set on the table and you try to run an ALTER TABLE … DROP ALL ROW ACCESS POLICIES command, Snowflake returns a successful status message:
+----------------------------------+ | status | |----------------------------------| | Statement executed successfully. | +----------------------------------+
This change can simplify your workflow scripts because you no longer need to have a workaround when Snowflake returns the error message.
Ref: 1327