2

I'm using PostGres 9.5. I'm confused about how to grant all privileges to a user for a particular database. I thought this would do the trick

postgres=# GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO cindex;
GRANT
postgres=# \q
localhost:cindex davea$ cindex
psql (9.5.0, server 9.5.1)
Type "help" for help.

cindex=> select * FROM crypto_currencies;
ERROR:  permission denied for relation crypto_currencies
cindex=>

but as you can see, I'm still getting "permission denied for relation" when I try and SELECT something. What else do I need to do to allow the user to select properly from all the tables in the database?

  • set search_path to public and try again. Also check the schema for crypto_currencies – Lohit Gupta Jul 31 '17 at 12:00

Your Answer

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

Browse other questions tagged or ask your own question.