Re: Rethinking LOCK TABLE's behavior on views

2020-11-10 Thread Noah Misch
On Mon, Nov 09, 2020 at 11:42:33AM -0300, Alvaro Herrera wrote: > On 2020-Nov-07, Noah Misch wrote: > > On Sat, Nov 07, 2020 at 11:57:20AM -0500, Tom Lane wrote: > > > A completely different approach we could consider is to weaken the > > > permissions requirements for LOCK on a view, say "allow it

Re: Rethinking LOCK TABLE's behavior on views

2020-11-09 Thread Alvaro Herrera
On 2020-Nov-07, Noah Misch wrote: > On Sat, Nov 07, 2020 at 11:57:20AM -0500, Tom Lane wrote: > > A completely different approach we could consider is to weaken the > > permissions requirements for LOCK on a view, say "allow it if either > > the calling user or the view owner has the needed permi

Re: Rethinking LOCK TABLE's behavior on views

2020-11-07 Thread Noah Misch
On Sat, Nov 07, 2020 at 11:57:20AM -0500, Tom Lane wrote: > The problems discussed in bug #16703 [1] show that pg_dump needs a > version of LOCK TABLE that behaves differently for views than > what we have now. Since v11, LOCK TABLE on a view recurses to all > tables and views named in the view, a

Rethinking LOCK TABLE's behavior on views

2020-11-07 Thread Tom Lane
The problems discussed in bug #16703 [1] show that pg_dump needs a version of LOCK TABLE that behaves differently for views than what we have now. Since v11, LOCK TABLE on a view recurses to all tables and views named in the view, and it does so using the view owner's permissions, meaning that a v