Is there an easy way to give role x blanket access to the objects in a
database?
I started with a default Debian setup of 8.4, which gives each OS user
passwordless login to their own databases if you setup a pg user with
the same name.
Edited pg_hba.conf to trust all users for the database of interest,
rossmail. Owner is ross.
As OS user Debian-exim, login to mydb. This works, but I get
"permission denied" when I tried to access the table.
As postgres, grant all privileges on database rossmail to "Debian-exim";
This didn't help. Perhaps it's relevant that I got a syntax error
unless I quoted Debian-exim, I assume because of the dash.
My theory is that I would need to grant privileges individually for each
table, index, ....
Is that theory right? Is there a command to do it all at once? I
though grant ... database... was that command, but it didn't work.
At this point I backed up and had OS user Debian-exim connect to the
database as PG user ross. That worked, albeit with minimal security.
Although my immediate problem is solved, I'd like to understand what's
going on.
Ross