Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Denis BUCHER <dbucherml@xxxxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux