lundi 29 juin 2015

Unable to grant Postgres permissions.

I'm using the following set of commands on Postgres 9.1 that has tables in abc.onlySchema.

create user myuser with password '1234';
create role mygroup inherit;

grant all privileges on database abc to mygroup;
grant all privileges on all tables in schema onlySchema to mygroup;
grant all privileges on all sequences in schema onlySchema to mygroup;
grant all privileges on all functions in schema onlySchema to mygroup;

grant mygroup to myuser;

The commands are entered by superuser myadmin. When I log in as myuser, I'm unable to select from tables I know exist and the command \dt returns nothing. Set role mygroup changes nothing. Am I missing some magic command that tells Postgres that I was serious when I issued the above commands. Perhaps a FLUSH PRIVILEGES-like command.

Btw, when I issue \dp as my myadmin user, the following appears {...,myuser=arwdDxt/myadmin} and I have set search_path = onlySchema; AND alter role myuser set search_path to onlySchema;. Still nothing.

Aucun commentaire:

Enregistrer un commentaire