From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com> |
Cc: | Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: dbuser acess privileges |
Date: | 2019-04-04 13:57:00 |
Message-ID: | 24297.1554386220@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com> writes:
> On Thu, Apr 4, 2019 at 5:55 PM Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>
> wrote:
>> If I’m not wrong, UPDATE requires SELECT permission as the UPDATE
>> statement needs to read the data to be updated.
> in 9.3 version Grant access on update command is worked EVEN I DID NOT
> EXECUTE THIS GRANT SELECT ON TABLE(hyd) for non superuser
I don't think so.
regression=# create table t1 (f1 int, f2 int);
CREATE TABLE
regression=# create user joe;
CREATE ROLE
regression=# grant update on table t1 to joe;
GRANT
regression=# \c - joe
You are now connected to database "regression" as user "joe".
regression=> update t1 set f1 = 1;
UPDATE 0
regression=> update t1 set f1 = 1 where f2 = 3;
ERROR: permission denied for relation t1
regression=> select version();
version
----------------------------------------------------------------------------------------------------------------
PostgreSQL 9.3.25 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23), 64-bit
(1 row)
It's acted that way for a very very long time.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2019-04-04 14:31:19 | Re: stale WAL files? |
Previous Message | David Rowley | 2019-04-04 13:47:04 | Re: PostgreSQL Windows 2019 support ? |