From 4baf131f591c991e95730a74221c5308304e7e19 Mon Sep 17 00:00:00 2001 From: Ramnivas Laddad Date: Fri, 27 Dec 2024 10:08:34 -0800 Subject: [PATCH] Improve error for an unexpected token after DROP Two changes: - Sort the expected tokens in the error message - Add the missing "POLICY" token --- src/parser/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 65991d324..967038547 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -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(), ); };