supabase-community / postgres_lsp

A Language Server for Postgres

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Statement parser does not recognise some statements

psteinroe opened this issue · comments

Some of the statements in the valid statements tests are not recognised as such. Especially CREATE POLICY, GRANT and REVOKE are never recognised as statements and thereby never past to the libpg_query parser. Take the following statements to test against.

-- 0027
GRANT UPDATE ON accounts TO Joe;
-- 0028
REVOKE ALL ON accounts FROM PUBLIC;
-- 0029
GRANT SELECT (col1), UPDATE (col1) ON mytable TO miriam_rw;

This has to be fixed in the statement parser.