Reputation: 11017
Trying to run various database commands, I got a lot of errors from postgres:
PG::InsufficientPrivilege: ERROR: permission denied to create database
ERROR: permission denied to create extension "hstore"
etc...
I can run them as the postgres user but this is annoying and finicky and will have to be repeated anytime i make a database operation. How to grant all permissions to a given user?
Upvotes: 1
Views: 733
Reputation: 11017
the following line worked to grant all permissions to my user:
sudo -u postgres psql -c "ALTER USER <username> SUPERUSER"
adapted from this thread
Upvotes: 1