Обсуждение: Newbie Question, how to grant permissions on all tables in schema/db

Поиск
Список
Период
Сортировка

Newbie Question, how to grant permissions on all tables in schema/db

От
Kenji Morishige
Дата:
Hi guys, I'm wondering what the easy way to grant user/group access on all tables
in a db.  I just migrated about 200 tables from my MySQL database using a cool
migration script, but now all the tables are owned by me in the schema public.

That is all fine and all, but I wish I could run a command like:

grant all on * to group developers;

where developers contain my created users.

is there a way to do this easily?

Thanks in advance!
-Kenji

Re: Newbie Question, how to grant permissions on all tables in schema/db

От
Michael Fuhr
Дата:
On Mon, Nov 08, 2004 at 05:00:49PM -0800, Kenji Morishige wrote:

> I'm wondering what the easy way to grant user/group access on all tables
> in a db.

This comes up from time to time -- search the archives for phrases
like "grant" and "all tables".  The responses usually suggest writing
a script or function to query the system catalogs for the list of
tables, views, sequences, etc.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/