RE: dbuser acess privileges

From: Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>
To: "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 12:58:51
Message-ID: VI1PR0501MB2574CC24F3801EB172BEC100EF500@VI1PR0501MB2574.eurprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Here is the extract of documentation relative to GRANT UPDATE

UPDATE
Allows UPDATE<https://www.postgresql.org/docs/current/sql-update.html> of any column, or the specific columns listed, of the specified table. (In practice, any nontrivial UPDATE command will require SELECT privilege as well, since it must reference table columns to determine which rows to update, and/or to compute new values for columns.) SELECT ... FOR UPDATE and SELECT ... FOR SHARE also require this privilege on at least one column, in addition to the SELECT privilege. For sequences, this privilege allows the use of the nextval and setval functions. For large objects, this privilege allows writing or truncating the object.
Regards,

Patrick Fiche
Database Engineer, Aqsacom Sas.
c. 33 6 82 80 69 96

[01-03_AQSA_Main_Corporate_Logo_JPEG_White_Low.jpg]<http://www.aqsacom.com/>

From: Ron <ronljohnsonjr(at)gmail(dot)com>
Sent: Thursday, April 4, 2019 2:50 PM
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: dbuser acess privileges

You'd think the implicit SELECT perm of that table for the explicit use of UPDATE would be covered by GRANT UPDATE.
On 4/4/19 7:25 AM, Patrick FICHE wrote:
Hi,

If I’m not wrong, UPDATE requires SELECT permission as the UPDATE statement needs to read the data to be updated.
So, you should probably add GRANT SELECT and you get it work.

Regards,

Patrick Fiche
Database Engineer, Aqsacom Sas.
c. 33 6 82 80 69 96

[01-03_AQSA_Main_Corporate_Logo_JPEG_White_Low.jpg]<http://www.aqsacom.com/>

From: Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com><mailto:maheshpostgres9(at)gmail(dot)com>
Sent: Thursday, April 4, 2019 12:07 PM
To: pgsql-general(at)lists(dot)postgresql(dot)org<mailto:pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: dbuser acess privileges

hi

Respected international pgsql team

pershing=# grant INSERT on public.hyd to ravi;
GRANT
i have granted insert command access to non superuser(ravi)
pershing=> insert into hyd (id,name) values('2','delhi');
INSERT 0 1
here data inserted

pershing=# grant UPDATE on public.hyd to ravi;
GRANT
i have granted update command access to non superuser(ravi)

pershing=> update public.hyd set id = 3 where name = 'hyderabad';
ERROR: permission denied for relation hyd
please let me know what is the issue with update command

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Durgamahesh Manne 2019-04-04 13:15:44 Re: dbuser acess privileges
Previous Message Ron 2019-04-04 12:49:48 Re: dbuser acess privileges