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

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: How to GRANT rights to modify a table ???
Дата
Msg-id 4AABC2E1.8060706@iol.ie
обсуждение исходный текст
Ответ на How to GRANT rights to modify a table ???  (Denis BUCHER <dbucherml@hsolutions.ch>)
Ответы Re: How to GRANT rights to modify a table ???  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 12/09/2009 16:44, Denis BUCHER wrote:
> Hello,
>
> A very annoying problem with Postgres is the following one :
>
> As postgres user, I give all rights to all objects of a database or
> schema to a colleague :
> GRANT ALL ON mytable TO mycolleague;
>
> But when he tries to modify something, even something really small like
> adding a column to a table :
> ALTER TABLE mytable ADD COLUMN field integer;
> ERROR: must be the owner of the mytable relation

The clue is in the error message :-) .... GRANTing ALL doesn't make them
the owner of the object as well.

For that, you have to do something like

  ALTER TABLE mytable OWNER TO mycolleague;

- I forget the exact syntax, but it'll be in the docs.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

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

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