File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8700,13 +8700,12 @@ impl<'a> Parser<'a> {
8700
8700
) ) ) ;
8701
8701
}
8702
8702
// [ [ NO ] CYCLE ]
8703
- if self . parse_keywords ( & [ Keyword :: NO ] ) {
8704
- if self . parse_keywords ( & [ Keyword :: CYCLE ] ) {
8705
- sequence_options. push ( SequenceOptions :: Cycle ( true ) ) ;
8706
- }
8703
+ if self . parse_keywords ( & [ Keyword :: NO , Keyword :: CYCLE ] ) {
8704
+ sequence_options. push ( SequenceOptions :: Cycle ( true ) ) ;
8707
8705
} else if self . parse_keywords ( & [ Keyword :: CYCLE ] ) {
8708
8706
sequence_options. push ( SequenceOptions :: Cycle ( false ) ) ;
8709
8707
}
8708
+
8710
8709
Ok ( sequence_options)
8711
8710
}
8712
8711
Original file line number Diff line number Diff line change @@ -276,6 +276,11 @@ fn parse_create_sequence() {
276
276
sql6,
277
277
"CREATE TEMPORARY SEQUENCE IF NOT EXISTS name3 INCREMENT 1 NO MINVALUE MAXVALUE 20 OWNED BY NONE" ,
278
278
) ;
279
+
280
+ assert ! ( matches!(
281
+ pg( ) . parse_sql_statements( "CREATE SEQUENCE foo INCREMENT 1 NO MINVALUE NO" ) ,
282
+ Err ( ParserError :: ParserError ( _) )
283
+ ) ) ;
279
284
}
280
285
281
286
#[ test]
You can’t perform that action at this time.
0 commit comments