RE: disallow LOCK on a view - the Tom Lane remix - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: disallow LOCK on a view - the Tom Lane remix
Date
Msg-id 000001c01211$b8c90660$2801007e@tpf.co.jp
Whole thread Raw
In response to Re: disallow LOCK on a view - the Tom Lane remix  (Alfred Perlstein <bright@wintelcom.net>)
List pgsql-hackers
> -----Original Message-----
> From: Alfred Perlstein
> 
> * Mark Hollomon <mhh@mindspring.com> [000829 11:26] wrote:
> > Here is a patch against CVS (without my earlier patch)
> > to disallow
> > 
> > LOCK x
> > 
> > if x is a view.
> > 
> > It does not use the SPI interface.
> 
> Waitasec, why??  This can be very useful if you want to atomically lock
> something that sits "in front" of several other tables that you need to
> do something atomically with.
> 
> Does it cause corruption if allowed?
>

If I remember correctly,the problem is "LOCK VIEW" acquires a
lock for the target view itself but doesn't acquire the lock for the
base tables of the view.

Regards.

Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Alfred Perlstein
Date:
Subject: Re: disallow LOCK on a view - the Tom Lane remix
Next
From: Tom Lane
Date:
Subject: Re: disallow LOCK on a view - the Tom Lane remix