Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactored as requested in PR and updated fail test accordingly
  • Loading branch information
LucaCappelletti94 committed Oct 10, 2025
commit 7e033621e2ea10094dde8e6bc3d62091b6bf6376
4 changes: 1 addition & 3 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5625,9 +5625,7 @@ impl<'a> Parser<'a> {
TriggerObjectKind::For(trigger_object)
})
} else {
if !dialect_of!(self is SQLiteDialect ) {
self.expect_keyword_is(Keyword::FOR)?;
}
let _ = self.parse_keyword(Keyword::FOR);

None
};
Expand Down
2 changes: 1 addition & 1 deletion tests/sqlparser_postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5869,7 +5869,7 @@ fn parse_create_trigger_invalid_cases() {
let invalid_cases = vec![
(
"CREATE TRIGGER check_update BEFORE UPDATE ON accounts FUNCTION check_account_update",
"Expected: FOR, found: FUNCTION"
"Expected: an SQL statement, found: FUNCTION"
),
(
"CREATE TRIGGER check_update TOMORROW UPDATE ON accounts EXECUTE FUNCTION check_account_update",
Expand Down
Loading