File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4592,7 +4592,8 @@ impl<'a> Parser<'a> {
4592
4592
let option = match self . parse_one_of_keywords ( & [ Keyword :: CASCADE , Keyword :: RESTRICT ] ) {
4593
4593
Some ( Keyword :: CASCADE ) => Some ( ReferentialAction :: Cascade ) ,
4594
4594
Some ( Keyword :: RESTRICT ) => Some ( ReferentialAction :: Restrict ) ,
4595
- _ => None ,
4595
+ Some ( _) => unreachable ! ( ) , // parse_one_of_keywords does not return other keywords
4596
+ None => None ,
4596
4597
} ;
4597
4598
Ok ( Statement :: DropProcedure {
4598
4599
if_exists,
Original file line number Diff line number Diff line change @@ -3717,6 +3717,18 @@ fn parse_drop_procedure() {
3717
3717
option: None
3718
3718
}
3719
3719
) ;
3720
+
3721
+ let res = pg ( ) . parse_sql_statements ( "DROP PROCEDURE testproc DROP" ) ;
3722
+ assert_eq ! (
3723
+ ParserError :: ParserError ( "Expected: end of statement, found: DROP" . to_string( ) ) ,
3724
+ res. unwrap_err( )
3725
+ ) ;
3726
+
3727
+ let res = pg ( ) . parse_sql_statements ( "DROP PROCEDURE testproc SET NULL" ) ;
3728
+ assert_eq ! (
3729
+ ParserError :: ParserError ( "Expected: end of statement, found: SET" . to_string( ) ) ,
3730
+ res. unwrap_err( )
3731
+ ) ;
3720
3732
}
3721
3733
3722
3734
#[ test]
You can’t perform that action at this time.
0 commit comments