I've been given credentials to a postgres database that I'm told it has privileges to create new users and grant them access to tables. This is half true.
I wish to create a new user:
create user foo login encrypted password 'bar';
commit;
This is OK. Now I'm trying to that user grant some specific access to selected tables:
grant select, insert, update on table baz to foo;
The response is [42501] ERROR: permission denied for relation baz
.
It seems that this user I've been given can't event select from the tables I wish to grant access to. select * from baz
also gives a 42501 error.
The query select distinct(grantor) from information_schema.role_table_grants;
returns one username (let's call it 'bob'). Should I be speaking with Bob about getting the privs I need?
root
? Or are you usingpostgres
? Please clarify.psql
)