Grant on Database?

Поиск
Список
Период
Сортировка
От David Wheeler
Тема Grant on Database?
Дата
Msg-id Pine.LNX.4.21.0102201656180.14743-100000@theory
обсуждение исходный текст
Список pgsql-general
Hey All,

We have a need to grant privileges on entire databases to users and/or
groups. It looks like GRANT just grants on tables and sequences, but I'd
like to know if there's a more direct way to do it. What I'm doing now
is getting a list of tables and sequences and calling grant for each one
in turn. How am I getting this list (I'm user Perl, not psql)? With this
query:

        SELECT relname
        FROM   pg_class
        WHERE  relkind IN ('r', 'S')
               AND relowner IN (
                   SELECT usesysid
                   FROM   pg_user
                   WHERE  LOWER(usename) = 'myuser')

Anyway, pointers to any shortcuts for this would be greatly appreciated.

Thanks,

David

--
David Wheeler
Software Engineer
Creation Engines, Inc.                             ICQ:   15726394
david@creationengines.com                          AIM:   dwTheory


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

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: Weird indices
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Weird indices