> > The rewriter correctly passes SELECT FOR UPDATE locking from the
> > view to the referenced tables, but I'm not sure whether it is
> > bright enough to do the same for LOCK statements. (Jan?)
>
> Isn't LOCK TABLE a utility statement? So it doesn't go
> through the rewriter.
>
> The LOCK code would have to do the correct locking of the
> underlying tables. And not to forget cascaded views or
> possible subselects.
>
> Actually LockTableCommand() in command.c doesn't do it. It
> simply locks the view relation, what's definitely wrong.
>
Added to TODO:
* Disallow LOCK on view
-- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026