Skip to content

Commit

Permalink
Improve error for an unexpected token after DROP
Browse files Browse the repository at this point in the history
Two changes:
- Sort the expected tokens in the error message
- Add the missing "POLICY" token
  • Loading branch information
ramnivas committed Dec 27, 2024
1 parent 6daa4b0 commit 4baf131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5458,7 +5458,7 @@ impl<'a> Parser<'a> {
return self.parse_drop_extension();
} else {
return self.expected(
"TABLE, VIEW, INDEX, ROLE, SCHEMA, DATABASE, FUNCTION, PROCEDURE, STAGE, TRIGGER, SECRET, SEQUENCE, TYPE, or EXTENSION after DROP",
"DATABASE, EXTENSION, FUNCTION, INDEX, POLICY, PROCEDURE, ROLE, SCHEMA, SECRET, SEQUENCE, STAGE, TABLE, TRIGGER, TYPE, or VIEW after DROP",
self.peek_token(),
);
};
Expand Down

0 comments on commit 4baf131

Please sign in to comment.