Re: How to GRANT rights to modify a table ???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to GRANT rights to modify a table ???
Дата
Msg-id 7892.1252775922@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to GRANT rights to modify a table ???  (Denis BUCHER <dbucherml@hsolutions.ch>)
Список pgsql-general
Denis BUCHER <dbucherml@hsolutions.ch> writes:
> Tom Lane a �crit :
>> What might be more practical is to create a group role that actually
>> owns the table, and make everyone who needs to do this sort of thing
>> a member of that group.

> It's strange but after having tried it, it doesn't work ?

Hmm, worksforme:

regression=# create table t1 (f1 int);
CREATE TABLE
regression=# create role t1o ;
CREATE ROLE
regression=# alter table t1 owner to t1o;
ALTER TABLE
regression=# create user joe;
CREATE ROLE
regression=# grant t1o to joe;
GRANT ROLE
regression=# \c - joe
psql (8.5devel)
You are now connected to database "regression" as user "joe".
regression=> alter table t1 add column f2 int;
ALTER TABLE
regression=>

One possibility is that your "mycolleague" user is set up without the
INHERIT property, in which case he'd have to do "SET ROLE tableowner"
to acquire the ownership privilege.  (tableowner's INHERIT setting
is not the relevant thing here; mycolleague's is.)

            regards, tom lane

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

Предыдущее
От: Denis BUCHER
Дата:
Сообщение: Re: How to GRANT rights to modify a table ???
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: primary keys