Re: How do I grant access to entire database at
От
Randall Perry
Тема
Re: How do I grant access to entire database at
Дата
Msg-id
BD2ACAC3.7F3D2%rgp@systame.com
Ответ на
Re: How do I grant access to entire database at (Oliver Elphick)
Список
Дерево обсуждения
How do I grant access to entire database at
once(schemas,tables,sequences,...)? Ulrich Meis <kenobi@halifax.rwth-aachen.de>
Re: How do I grant access to entire database at once(schemas,tables,sequences,...)? Peter Eisentraut <peter_e@gmx.net>
Re: How do I grant access to entire database at Randall Perry <rgp@systame.com>
Re: How do I grant access to entire database at Oliver Elphick <olly@lfix.co.uk>
Re: How do I grant access to entire database at Randall Perry <rgp@systame.com>
Re: How do I grant access to entire database at Jean-Luc Lachance <jllachan@sympatico.ca>
Re: How do I grant access to entire database at Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
Re: How do I grant access to entire database at Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
Re: How do I grant access to entire database at Tom Lane <tgl@sss.pgh.pa.us>
Re: How do I grant access to entire database at Randall Perry <rgp@systame.com>
Thanks, I'll use it.
But, if the developer's are listening -- this is really obtuse. MySQL
administration is much easier. Please consider simplifying the GRANT process
for future revs.
BTW, I prefer postgresql for all my own development.
on 7/18/04 4:41 PM, Oliver Elphick at olly@lfix.co.uk wrote:
> On Sun, 2004-07-18 at 20:52, Randall Perry wrote:
>> This is a pain. Couldn't we gave something simple like
>> GRANT ALL ON database.* TO JOE;
>>
>> Which would grant full access to all objects in the database to JOE for all
>> time?
>
> You can do it like this in psql:
>
> \a
> \t
> \o /tmp/grant.sql
> SELECT 'GRANT ALL ON ' || n.nspname || '.' || c.relname ||
> ' TO joe;'
> FROM pg_catalog.pg_class AS c
> LEFT JOIN pg_catalog.pg_namespace AS n
> ON n.oid = c.relnamespace
> WHERE c.relkind IN ('r','v','S') AND
> n.nspname NOT IN ('pg_catalog', 'pg_toast') AND
> pg_catalog.pg_table_is_visible(c.oid)
> ORDER BY n.nspname, c.relname;
> \o
> \i /tmp/grant.sql
>
>
> The above could be put in a script and run from a Unix command prompt.
>
> (The SQL used above is adaated from that used by psql's \d command.)
--
Randall Perry
sysTame
Xserve Web Hosting/Co-location
Website Design/Development
WebObjects Hosting
Mac Consulting/Sales
http://www.systame.com/
В списке pgsql-admin по дате отправления