On Sun, Dec 11, 2022 at 06:25:48PM +0900, Amit Langote wrote: > On Sun, Dec 11, 2022 at 5:17 AM Justin Pryzby <pry...@telsasoft.com> wrote: > > The original code rechecks rte->checkAsUser with the rte of the parent > > rel. The patch changed to access onerel instead, but that's not updated > > after looping to find the parent. > > > > Is that okay ? It doesn't seem intentional, since "userid" is still > > being recomputed, but based on onerel, which hasn't changed. The > > original intent (since 553d2ec27) is to recheck the parent's > > "checkAsUser". > > > > It seems like this would matter for partitioned tables, when the > > partition isn't readable, but its parent is, and accessed via a view > > owned by another user? > > Thanks for pointing this out. > > I think these blocks which are rewriting userid to basically the same > value should have been removed from these sites as part of 599b33b94.
I thought maybe; thanks for checking. Little nitpicks: 001: Fine to use the same userid as it's same in all => the same 002: give that it's a subquery rel. => given -- Justin