| From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
|---|---|
| To: | Robins Tharakan <tharakan(at)gmail(dot)com> |
| Cc: | pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Clarity on how LOCK interacts with INHERIT |
| Date: | 2013-04-12 21:09:07 |
| Message-ID: | CA+U5nM+Px1b_C48xLH-Jg1iXejLmn6Za=NRFxo-ZGA50kAa83Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On 12 April 2013 21:59, Robins Tharakan <tharakan(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tony Capobianco | 2013-04-12 21:14:28 | pivot query with count |
| Previous Message | Robins Tharakan | 2013-04-12 20:59:27 | Clarity on how LOCK interacts with INHERIT |