Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC2rf-0001e1-V9 for pgsql-general@arkaria.postgresql.org; Thu, 04 Apr 2019 13:57:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hC2re-0000QG-Ln for pgsql-general@arkaria.postgresql.org; Thu, 04 Apr 2019 13:57:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC2re-0000Q8-9N for pgsql-general@lists.postgresql.org; Thu, 04 Apr 2019 13:57:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC2rb-0001Pm-Ne for pgsql-general@lists.postgresql.org; Thu, 04 Apr 2019 13:57:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x34Dv0dF024298; Thu, 4 Apr 2019 09:57:00 -0400 From: Tom Lane To: Durgamahesh Manne cc: Patrick FICHE , "pgsql-general@lists.postgresql.org" Subject: Re: dbuser acess privileges In-reply-to: References: Comments: In-reply-to Durgamahesh Manne message dated "Thu, 04 Apr 2019 18:45:44 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <24296.1554386220.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Apr 2019 09:57:00 -0400 Message-ID: <24297.1554386220@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Durgamahesh Manne writes: > On Thu, Apr 4, 2019 at 5:55 PM Patrick FICHE > wrote: >> If I=E2=80=99m not wrong, UPDATE requires SELECT permission as the UPDA= TE >> 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=3D# create table t1 (f1 int, f2 int); CREATE TABLE regression=3D# create user joe; CREATE ROLE regression=3D# grant update on table t1 to joe; GRANT regression=3D# \c - joe You are now connected to database "regression" as user "joe". regression=3D> update t1 set f1 =3D 1; UPDATE 0 regression=3D> update t1 set f1 =3D 1 where f2 =3D 3; ERROR: permission denied for relation t1 regression=3D> 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