Re: GRANT on all tables?

Поиск
Список
Период
Сортировка
От Simon Fortelny
Тема Re: GRANT on all tables?
Дата
Msg-id Pine.GSO.4.44.0304231247540.27528-100000@fred
обсуждение исходный текст
Ответ на GRANT on all tables?  (dudsen <dudsen@koen.dk>)
Список pgsql-admin
Can't remember where I found this but its worked in the past for
granting privileges to all tables in a DB to a user.

./psql -t -A -U $OWNER -W -c "select tablename from pg_tables
where tablename not like 'pg_%'" $mydatabase | xargs -i ./psql -U
$OWNER -W -c "grant ALL on {} to $NEWUSER" $mydatabase


--------------------------------------------------------------------------
Simon Fortelny
Research Technician
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. D4-100
Seattle, WA 98109-1024

tel. 206.667.5618
email. sforteln@fred.fhcrc.org

On Wed, 16 Apr 2003, dudsen wrote:

> How do I GRANT an user privileges for all tables in an database with one
> command, as it is now i need to specify the name of each table.
> I want to write something like
> GRANT SELECT,INSERT ON mydatabase TO user; this doesn't work but are there a
> way of getting someting similar to work?
>
> --
> Daniel Udsen
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>


В списке pgsql-admin по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Log Output Going to STDERR even with silent mode on
Следующее
От: "Gaetano Mendola"
Дата:
Сообщение: News group