I want to make a typical user in postgres that will be used by my web application.
- The web application will require access to all tables.
- The user should be able to read/write to all tables (select, update, delete, insert)
All tables belong to the public schema
What is the best practise for creating this user?
database name: acmeincuser: acmeuser
I tried this so far and I was not able to even update a table (permission error on the relation):
create user acmeusergrant all privileges on database acmeinc to acmeuseralter schema public owner to acmeuserALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO acmeuser
Update:
I was running the above like:
psql acmeinc -c "create user acmeuser"
Should I be creating a role and then associating the user acmeuser to the role?