On 12 April 2013 21:59, Robins Tharakan <thara...@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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to