3

What is wrong with the following statement?

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO foo;

I get this error

ERROR:  syntax error at or near "ALL"
LINE 2: ON ALL TABLES IN SCHEMA public TO foo;

I am using postgreSQL 8.3 on Ubuntu.

6

Your syntax is correct but only for PostgreSQL 9.0 and newer.
In 8.3 you will have to list all tables by name:

GRANT SELECT, INSERT, UPDATE, DELETE ON tab1, tab2, tab3 TO foo;
1

AFAIK, this is invalid in postgresql DB. You should grant the privileges on all tables by specifying them. The word ALL is invalid here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.