Re: Revised Patch to allow multiple table locks in "Unison" - Mailing list pgsql-patches

From Tom Lane
Subject Re: Revised Patch to allow multiple table locks in "Unison"
Date
Msg-id 12542.996782744@sss.pgh.pa.us
Whole thread Raw
In response to Re: Revised Patch to allow multiple table locks in "Unison"  (Fernando Nasser <fnasser@cygnus.com>)
Responses Re: Revised Patch to allow multiple table locks in "Unison"  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Fernando Nasser <fnasser@cygnus.com> writes:
> What about having the syntax
> LOCK a,b,c;
> now just as a shorthand for
> LOCK a;
> LOCK b;
> LOCK c;
> This would save typing and allow for Oracle compatibility.

This seems fine to me (and in fact I thought we'd already agreed to it).
Maybe some day we will get ambitious enough to make it do
parallel-locking, but for now we can get 80% of what we want with 0.8%
of the effort ;-)

> I wonder how we handle
> LOCK v;
> where "v" is a view.

regression=# create view v as select * from int4_tbl;
CREATE
regression=# lock table v;
ERROR:  LOCK TABLE: v is not a table

> We should be locking all the base tables.

I consider that debatable.  It hard-wires a rather constricted idea
of what the semantics of a view are.

            regards, tom lane

pgsql-patches by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: Revised Patch to allow multiple table locks in "Unison"
Next
From: Neil Padgett
Date:
Subject: Re: Revised Patch to allow multiple table locks in "Unison"