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>)
Список pgsql-sql
On 12 April 2013 21:59, Robins Tharakan <tharakan@gmail.com> 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
Дата:
Сообщение: Clarity on how LOCK interacts with INHERIT
Следующее
От: Tony Capobianco
Дата:
Сообщение: pivot query with count