Skip to content

Commit

Permalink
Refacto RLS for table
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKuat committed Aug 6, 2024
1 parent 8475e6e commit 556e80e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions sql/snowflake/SnowflakeParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1154,10 +1154,7 @@ alter_table
|
)
//[ , ... ]
| ALTER TABLE if_exists? object_name ADD ROW ACCESS POLICY id_ ON column_list_in_parentheses
| ALTER TABLE if_exists? object_name DROP ROW ACCESS POLICY id_
| ALTER TABLE if_exists? object_name DROP ROW ACCESS POLICY id_ COMMA ADD ROW ACCESS POLICY id_ ON column_list_in_parentheses
| ALTER TABLE if_exists? object_name DROP ALL ROW ACCESS POLICIES
| ALTER TABLE if_exists? object_name rls_operations
;

rls_operations
Expand Down
3 changes: 3 additions & 0 deletions sql/snowflake/examples/tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ create table t(i int);

alter table t add column if not exists j int;
alter table t drop column if exists i;
ALTER TABLE t ADD ROW ACCESS POLICY RLS ON (j);
ALTER TABLE t DROP ROW ACCESS POLICY RLS;
ALTER TABLE t DROP ROW ACCESS POLICY RLS , ADD ROW ACCESS POLICY RLS ON (j);

0 comments on commit 556e80e

Please sign in to comment.