Waiting for 8.5 – “GRANT ALL”

One of the most common (or perhaps even the most common) question people have regarding PostgreSQL, is how to change privileges for all tables.

Usually they want something like MySQL's:

GRANT ... ON DATABASE.* TO ...

Which is interesting as it is actually 2 distinct features in one:

  • grant privileges on all existing tables
  • automatically grant privileges on all tables that will be created in this database in the future

Now, thanks to 2 new patches – we have this possibility in PostgreSQL.

Continue reading Waiting for 8.5 – “GRANT ALL"

grant XXX on * ?

one of the more common problems new users have with postgresql (especially those that came from mysql background), is the lack of easy way to grant/revoke/do-something with many objects (tables/sequences/views) at once.

there are number of pages that deal with the problem, let's just name some from #postgresql infobots:

now, both of these pages have their benefits, but i'd like to show something simpler, yet (perhaps) more powerful.

instead of giving you the fish (figuratively speaking) i will give you the net and the skills so you'll be able to do the magic yourself.

Continue reading grant XXX on * ?