Re: Clarity on how LOCK interacts with INHERIT

Поиск
Список
Период
Сортировка
Искать
От
Simon Riggs
Тема
Re: Clarity on how LOCK interacts with INHERIT
Дата
Msg-id
CA+U5nM+Px1b_C48xLH-Jg1iXejLmn6Za=NRFxo-ZGA50kAa83Q@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Clarity on how LOCK interacts with INHERIT Robins Tharakan <tharakan@gmail.com>
Re: Clarity on how LOCK interacts with INHERIT Simon Riggs <simon@2ndQuadrant.com>
On 12 April 2013 21:59, Robins Tharakan  wrote:

> postgres=# CREATE TABLE lock_tbl6 (b BIGINT) INHERITS (lock_tbl5);
> CREATE TABLE

> postgres=> LOCK TABLE lock_tbl6 * IN access EXCLUSIVE MODE;
> LOCK TABLE

> postgres=> LOCK TABLE lock_tbl5 IN access EXCLUSIVE MODE;
> ERROR:  permission denied for relation lock_tbl5
> STATEMENT:  LOCK TABLE lock_tbl5 IN access EXCLUSIVE MODE;
> ERROR:  permission denied for relation lock_tbl5

No problem.

LOCK * locks only the descendants, so tbl5 is not locked since it is
not a decendant of tbl6.

--Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-sql по дате отправления
От: Robins Tharakan
Дата:
От: Tony Capobianco
Дата:
Сообщение: pivot query with count
FAQ