Skip to content
Advertisement

postgres syntax error on grant select on table

I have a query:

But on running this: I get the following syntax error:

without grant query its working fine.

What am I missing here?

Advertisement

Answer

To specify the schema, use ON public.abc.
The syntax IN SCHEMA public can only be used with ON ALL TABLES.

Also, you have to separate CREATE TABLE and GRANT with a semicolon, as they are two separate statements.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement