File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,6 +319,14 @@ pub enum AlterTableOperation {
319319 ///
320320 /// Note: this is a PostgreSQL-specific operation.
321321 EnableRowLevelSecurity ,
322+ /// `FORCE ROW LEVEL SECURITY`
323+ ///
324+ /// Note: this is a PostgreSQL-specific operation.
325+ ForceRowLevelSecurity ,
326+ /// `NO FORCE ROW LEVEL SECURITY`
327+ ///
328+ /// Note: this is a PostgreSQL-specific operation.
329+ NoForceRowLevelSecurity ,
322330 /// `ENABLE RULE rewrite_rule_name`
323331 ///
324332 /// Note: this is a PostgreSQL-specific operation.
@@ -876,6 +884,12 @@ impl fmt::Display for AlterTableOperation {
876884 AlterTableOperation :: EnableRowLevelSecurity => {
877885 write ! ( f, "ENABLE ROW LEVEL SECURITY" )
878886 }
887+ AlterTableOperation :: ForceRowLevelSecurity => {
888+ write ! ( f, "FORCE ROW LEVEL SECURITY" )
889+ }
890+ AlterTableOperation :: NoForceRowLevelSecurity => {
891+ write ! ( f, "NO FORCE ROW LEVEL SECURITY" )
892+ }
879893 AlterTableOperation :: EnableRule { name } => {
880894 write ! ( f, "ENABLE RULE {name}" )
881895 }
Original file line number Diff line number Diff line change @@ -1121,6 +1121,8 @@ impl Spanned for AlterTableOperation {
11211121 AlterTableOperation :: EnableReplicaRule { name } => name. span ,
11221122 AlterTableOperation :: EnableReplicaTrigger { name } => name. span ,
11231123 AlterTableOperation :: EnableRowLevelSecurity => Span :: empty ( ) ,
1124+ AlterTableOperation :: ForceRowLevelSecurity => Span :: empty ( ) ,
1125+ AlterTableOperation :: NoForceRowLevelSecurity => Span :: empty ( ) ,
11241126 AlterTableOperation :: EnableRule { name } => name. span ,
11251127 AlterTableOperation :: EnableTrigger { name } => name. span ,
11261128 AlterTableOperation :: RenamePartitions {
Original file line number Diff line number Diff line change @@ -9794,6 +9794,21 @@ impl<'a> Parser<'a> {
97949794 self.peek_token(),
97959795 );
97969796 }
9797+ } else if self.parse_keywords(&[
9798+ Keyword::FORCE,
9799+ Keyword::ROW,
9800+ Keyword::LEVEL,
9801+ Keyword::SECURITY,
9802+ ]) {
9803+ AlterTableOperation::ForceRowLevelSecurity
9804+ } else if self.parse_keywords(&[
9805+ Keyword::NO,
9806+ Keyword::FORCE,
9807+ Keyword::ROW,
9808+ Keyword::LEVEL,
9809+ Keyword::SECURITY,
9810+ ]) {
9811+ AlterTableOperation::NoForceRowLevelSecurity
97979812 } else if self.parse_keywords(&[Keyword::CLEAR, Keyword::PROJECTION])
97989813 && dialect_of!(self is ClickHouseDialect|GenericDialect)
97999814 {
Original file line number Diff line number Diff line change @@ -640,6 +640,8 @@ fn parse_alter_table_enable() {
640640 pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab ENABLE REPLICA TRIGGER trigger_name" ) ;
641641 pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab ENABLE REPLICA RULE rule_name" ) ;
642642 pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab ENABLE ROW LEVEL SECURITY" ) ;
643+ pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab FORCE ROW LEVEL SECURITY" ) ;
644+ pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab NO FORCE ROW LEVEL SECURITY" ) ;
643645 pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab ENABLE RULE rule_name" ) ;
644646 pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab ENABLE TRIGGER ALL" ) ;
645647 pg_and_generic ( ) . verified_stmt ( "ALTER TABLE tab ENABLE TRIGGER USER" ) ;
You can’t perform that action at this time.
0 commit comments