From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Denis BUCHER <dbucherml(at)hsolutions(dot)ch> |
Cc: | rod(at)iol(dot)ie, PostgreSQL - General ML <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to GRANT rights to modify a table ??? |
Date: | 2009-09-12 17:18:42 |
Message-ID: | 7892.1252775922@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Denis BUCHER <dbucherml(at)hsolutions(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2009-09-12 17:52:21 | Re: primary keys |
Previous Message | Denis BUCHER | 2009-09-12 17:17:08 | Re: How to GRANT rights to modify a table ??? |