pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eugene E. <sad@bankir.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Permission to Select
Date: Tue, 14 Mar 2006 08:59:48 +0300
Message-ID: <44165BD4.2040005@bankir.ru> (raw)
In-Reply-To: <7412.1142263647@sss.pgh.pa.us>
References: <Pine.LNX.4.44.0507280919020.4325-100000@matrix.gatewaynet.com>
	<441540AA.3090202@bankir.ru>
	<7412.1142263647@sss.pgh.pa.us>

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.




view thread (10+ messages)  latest in thread

Message-ID: <44165BD4.2040005@bankir.ru>
Permalink:  ../44165BD4.2040005@bankir.ru/
Also on:    postgresql.org/message-id/44165BD4.2040005@bankir.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sad@bankir.ru, tgl@sss.pgh.pa.us
  Subject: Re: Permission to Select
  In-Reply-To: <44165BD4.2040005@bankir.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox