permissions, exclusive row locks, and delete - Mailing list pgsql-novice

From Christian Lawrence
Subject permissions, exclusive row locks, and delete
Date
Msg-id 51AD2824.603@calorieking.com
Whole thread Raw
Responses Re: permissions, exclusive row locks, and delete  (Daniel Wood <dwood@salesforce.com>)
List pgsql-novice
Hi!

I have a question, which I'm certain may be a bug, but I thought I'd
check with the community first before submitting it as one.

I have the following SQL pseudo code which obtains an exclusive row lock
before deleting the row:

SELECT * FROM sometable WHERE (id = :id) FOR UPDATE;
DELETE FROM sometable WHERE (id = :id);

The user account has SELECT and DELETE permissions on the table.
However, the SELECT FOR UPDATE will succeed only if the user account has
UPDATE permissions.

Is this a bug, or is there another way of obtaining an exclusive lock on
rows for delete without escalating permissions?

--
Christian Lawrence
Senior Developer
CalorieKing Wellness Solutions Incorporated
T: +618.9389.8777
F: +618.9389.8444
E: christian.lawrence@calorieking.com
W: www.calorieking.com


pgsql-novice by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Copy to Csv file extremely slow
Next
From: Daniel Wood
Date:
Subject: Re: permissions, exclusive row locks, and delete