Re: Permission to Select - Mailing list pgsql-sql

From Eugene E.
Subject Re: Permission to Select
Date
Msg-id 44165BD4.2040005@bankir.ru
Whole thread Raw
In response to Re: Permission to Select  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Permission to Select
List pgsql-sql
Tom Lane wrote:
> "Eugene E." <sad@bankir.ru> writes:
> 
>>db=# REVOKE all ON t FROM u;
>>db=# GRANT update,insert,delete ON t TO u;
>>db=# \c - u
> 
> 
>>db=> INSERT INTO t VALUES (1,'x');
>>INSERT
>>db=> UPDATE t SET a='y' WHERE i=1;
>>ERROR: Permission denied for relation t;
>>db=> UPDATE t SET a='y';
>>UPDATE
> 
> 
> This behavior is correct and as documented in the UPDATE reference page:

Good
if you have a strange behavior - just document it. quite good.


>     You must have the UPDATE privilege on the table to update it, as
>     well as the SELECT privilege to any table whose values are read
>     in the expressions or condition.

This means that some privileges are NOT INDEPENDENT.



pgsql-sql by date:

Previous
From: "Kenneth Hutchinson"
Date:
Subject: unsubscribe
Next
From: "Eugene E."
Date:
Subject: Re: Permission to Select