permissions, exclusive row locks, and delete

Поиск
Список
Период
Сортировка
От Christian Lawrence
Тема permissions, exclusive row locks, and delete
Дата
Msg-id 51AD2824.603@calorieking.com
обсуждение исходный текст
Ответы Re: permissions, exclusive row locks, and delete  (Daniel Wood <dwood@salesforce.com>)
Список 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 по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Copy to Csv file extremely slow
Следующее
От: Daniel Wood
Дата:
Сообщение: Re: permissions, exclusive row locks, and delete