From: Tom Lane <tgl@sss.pgh.pa.us>
To: Durgamahesh Manne <maheshpostgres9@gmail.com>
Cc: Patrick FICHE <Patrick.Fiche@aqsacom.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: dbuser acess privileges
Date: Thu, 04 Apr 2019 09:57:00 -0400
Message-ID: <24297.1554386220@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJCZkoKOE2sTMsHZ0622A_G8VXFNgpL0N-DR0=KannDinh5Jpw@mail.gmail.com>
References: <CAJCZkoJo_e8yQCowniedv3Tw5MqZ55NNfumSSd=bWKeE+Vrjuw@mail.gmail.com>
<VI1PR0501MB2574023F98327C987C2346C1EF500@VI1PR0501MB2574.eurprd05.prod.outlook.com>
<CAJCZkoKOE2sTMsHZ0622A_G8VXFNgpL0N-DR0=KannDinh5Jpw@mail.gmail.com>
Durgamahesh Manne <maheshpostgres9@gmail.com> writes:
> On Thu, Apr 4, 2019 at 5:55 PM Patrick FICHE <Patrick.Fiche@aqsacom.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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, maheshpostgres9@gmail.com, Patrick.Fiche@aqsacom.com
Subject: Re: dbuser acess privileges
In-Reply-To: <24297.1554386220@sss.pgh.pa.us>
References: <CAJCZkoJo_e8yQCowniedv3Tw5MqZ55NNfumSSd=bWKeE+Vrjuw@mail.gmail.com> <VI1PR0501MB2574023F98327C987C2346C1EF500@VI1PR0501MB2574.eurprd05.prod.outlook.com> <CAJCZkoKOE2sTMsHZ0622A_G8VXFNgpL0N-DR0=KannDinh5Jpw@mail.gmail.com> <24297.1554386220@sss.pgh.pa.us>
* 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