Re: Best practice to grant all privileges on all bjects in database?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Best practice to grant all privileges on all bjects in database?
Дата
Msg-id 9e4684ce0605260000j12d3c11du86be1560c110f0f4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Best practice to grant all privileges on all bjects in database?  (Jim Nasby <jnasby@pervasive.com>)
Список pgsql-general
On 5/26/06, Jim Nasby <jnasby@pervasive.com> wrote:
Only helps if the OP is willing to run on HEAD; grant on sequence is
not in 8.1 (at least not according to the docs).

you can grant on sequences using syntax for tables. works:

(pgdba@[local]:5810) 08:59:21 [depesz]
# create sequence test;
CREATE SEQUENCE

(pgdba@[local]:5810) 08:59:27 [depesz]
# \c - depesz
You are now connected as new user "depesz".

(depesz@[local]:5810) 08:59:29 [depesz]
> select nextval('test');
ERROR:  permission denied for sequence test

(depesz@[local]:5810) 08:59:34 [depesz]
> \c - pgdba
You are now connected as new user "pgdba".

(pgdba@[local]:5810) 08:59:36 [depesz]
# grant select, update on table test to depesz;
GRANT

(pgdba@[local]:5810) 08:59:43 [depesz]
# \c - depesz
You are now connected as new user "depesz".

(depesz@[local]:5810) 08:59:46 [depesz]
> select nextval('test');
 nextval
---------
       1
(1 row)


though i can't find it anywhere in documentation :(

depesz

--
http://www.depesz.com/ - nowy, lepszy depesz

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

Предыдущее
От: Rafal Pietrak
Дата:
Сообщение: Re: Restricting access to rows?
Следующее
От: "surabhi.ahuja"
Дата:
Сообщение: latest release of 8.0.8