Re: Permission to Select

From: "Eugene E(dot)" <sad(at)bankir(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Permission to Select
Date: 2006-03-14 05:59:48
Message-ID: 44165BD4.2040005@bankir.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom Lane wrote:
> "Eugene E." <sad(at)bankir(dot)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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Eugene E. 2006-03-14 06:06:46 Re: Permission to Select
Previous Message Kenneth Hutchinson 2006-03-14 04:25:28 unsubscribe