Re: How to GRANT rights to modify a table ??? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: How to GRANT rights to modify a table ???
Date
Msg-id 4AABC2E1.8060706@iol.ie
Whole thread Raw
In response to How to GRANT rights to modify a table ???  (Denis BUCHER <dbucherml@hsolutions.ch>)
Responses Re: How to GRANT rights to modify a table ???
List 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 by date:

Previous
From: Denis BUCHER
Date:
Subject: How to GRANT rights to modify a table ???
Next
From: Tom Lane
Date:
Subject: Re: How to GRANT rights to modify a table ???