File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11127,6 +11127,19 @@ fn test_alter_policy() {
11127
11127
// omit TO / USING / WITH CHECK clauses is allowed
11128
11128
verified_stmt ( "ALTER POLICY my_policy ON my_table" ) ;
11129
11129
11130
+ // mixing RENAME and APPLY expressions
11131
+ assert_eq ! (
11132
+ parse_sql_statements( "ALTER POLICY old_policy ON my_table TO public RENAME TO new_policy" )
11133
+ . unwrap_err( )
11134
+ . to_string( ) ,
11135
+ "sql parser error: Expected: end of statement, found: RENAME"
11136
+ ) ;
11137
+ assert_eq ! (
11138
+ parse_sql_statements( "ALTER POLICY old_policy ON my_table RENAME TO new_policy TO public" )
11139
+ . unwrap_err( )
11140
+ . to_string( ) ,
11141
+ "sql parser error: Expected: end of statement, found: TO"
11142
+ ) ;
11130
11143
// missing TO in RENAME TO
11131
11144
assert_eq ! (
11132
11145
parse_sql_statements( "ALTER POLICY old_policy ON my_table RENAME" )
You can’t perform that action at this time.
0 commit comments