Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-05-07 21:45:02 -0400, Tom Lane wrote:
>> Well, it might fail to report a permissions violation when the
>> not-allowed-to-be-accessed relation could be proven to yield no rows.
> Couldn't it also cause tables not to be locked that ought to be? That
> seems to be the nastier part to me.
In ordinary immediate execution the parser or planner would have
obtained the relevant table lock. I think what you say is possible if a
prepared plan is re-executed, but TBH it doesn't sound like much of an
issue to me.
regards, tom lane