[NBLUG/talk] PostgreSQL Database Grants?

Augie Schwer augie.schwer at gmail.com
Thu Jul 6 17:32:42 PDT 2006


So in MySQL if you want to grant privileges on all tables in a
database (even future ones) you say something like:

GRANT ALL PRIVILEGES ON dbname.* TO luser;

But Postgres seems to only understand such SQL query grants for
existing table names.
(http://www.postgresql.org/docs/8.0/interactive/sql-grant.html) Which
would be a real pain in the butt if say you have 100 tables that need
grants, or heaven forbid you actually added another 100 tables to an
existing DB.

Does anyone know of a good solution? I googled around and all the
solutions of creating functions and re-running those functions every
time you add a table seemed pretty hackish.


-- 
Augie Schwer    -    Augie at Schwer.us    -    http://schwer.us
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072



More information about the talk mailing list