Re: Clarity on how LOCK interacts with INHERIT - Mailing list pgsql-sql

From Simon Riggs
Subject Re: Clarity on how LOCK interacts with INHERIT
Date
Msg-id CA+U5nM+Px1b_C48xLH-Jg1iXejLmn6Za=NRFxo-ZGA50kAa83Q@mail.gmail.com
Whole thread Raw
In response to Clarity on how LOCK interacts with INHERIT  (Robins Tharakan <tharakan@gmail.com>)
List 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 by date:

Previous
From: Robins Tharakan
Date:
Subject: Clarity on how LOCK interacts with INHERIT
Next
From: Tony Capobianco
Date:
Subject: pivot query with count