PostgreSQL grant limitations

User management is very different in MySQL and PostgreSQL.
Generaly, PostgreSQL is superior (groups, no host dependencies …) But there is a really annoying point : you can’t grant rights on all the table in a schema !

For example you grant select on table Tone, Ttwo, Tthree TO Joe; OK Latter, you add a table “Tfor”. You will have to grant select on table Tfor to Joe;
The only solution to automate this would be to run a cron job every hours to add the missing rights !
In MySQL you simply grant SELECT on schema.* to Joe; Ok, maybe it isn’t ANSI SQL, but so usefull !

At least there are some scripts you can run to setup the right on many tables at once :

And here is an old thread about potential solutions : pgsql-hackers 2005

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: