Обсуждение: BUG #5710: lock requires unintuitive privileges

Поиск
Список
Период
Сортировка

BUG #5710: lock requires unintuitive privileges

От
""
Дата:
The following bug has been logged online:

Bug reference:      5710
Logged by:
Email address:      mstone+postgres@mathom.us
PostgreSQL version: 8.4.5
Operating system:   Ubuntu
Description:        lock requires unintuitive privileges
Details:

I haven't been able to find specific documentation on what privileges are
required to use various levels of the LOCK command. A comment somewhere in
the interactive documentation (can't find it again) said that UPDATE is
required for ROW EXCLUSIVE, which does seem to match reality. But the
documentation in section 13.3 says that a ROW EXCLUSIVE lock is implicitly
granted for "UPDATE, DELETE, and INSERT" -- which begs the question of why
UPDATE is required for the explicit lock and INSERT is not sufficient. I'm
not sure if this is a bug or a feature; if the latter I'd suggest that
synchronizing the privileges required for explicit and implicit locks would
be helpful.