Re: LOCK TABLE permission requirements

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: LOCK TABLE permission requirements
Дата
Msg-id CAK3UJRE5pvDF59-9o6SUrMRuOzsx=Ex4QTkkerPkKiCDLNDTpA@mail.gmail.com
обсуждение исходный текст
Ответ на LOCK TABLE permission requirements  (Florian Weimer <fweimer@bfk.de>)
Ответы Re: LOCK TABLE permission requirements  (Florian Weimer <fweimer@bfk.de>)
Список pgsql-general
On Wed, Jun 29, 2011 at 7:48 AM, Florian Weimer <fweimer@bfk.de> wrote:
> I've been looking around in the 9.0 documentation, but couldn't find the
> permission requirements for LOCK TABLE (in particular, LOCK TABLE IN
> SHARE MODE).  From the source, you need at least one of UPDATE, DELETE
> or TRUNCATE.
>
> Is there a reason why the INSERT privilege is not sufficient for LOCK
> TABLE, or is this just an oversight?

The comments on this thread outline some reasons the permissions for
LOCK TABLE are setup the way they are:
  http://archives.postgresql.org/pgsql-hackers/2010-11/msg01819.php

Basically, if you have UPDATE, DELETE, or TRUNCATE privileges you can
potentially lock out competing sessions on a table, similar to what
some forms of LOCK TABLE would do; just having INSERT privileges
doesn't necessarily give you that power.

Josh

В списке pgsql-general по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Real type with zero
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Windows x64 : How do I get OSSP-UUID.sql contrib for postgresql x64