takluyver commented on code in PR #2071:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2071#discussion_r2447084361
##########
src/parser/mod.rs:
##########
@@ -5592,7 +5592,20 @@ impl<'a> Parser<'a> {
}
let name = self.parse_object_name(false)?;
- let period = self.parse_trigger_period()?;
+ let period = if dialect_of!(self is SQLiteDialect)
+ && self
+ .peek_one_of_keywords(&[
+ Keyword::INSERT,
+ Keyword::UPDATE,
+ Keyword::DELETE,
+ Keyword::TRUNCATE,
+ ])
+ .is_some()
+ {
+ None // SQLite: period can be skipped (equivalent to BEFORE)
+ } else {
+ Some(self.parse_trigger_period()?)
+ };
Review Comment:
Thanks!
Allowing this for all dialects changes an error message that is tested for
the Postgres dialect. For now I'll change that test so that everything passes,
but if you'd prefer a different direction, like making it conditional on the
dialect again, I can easily cut that commit off.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]