Nathan Bossart <nathandboss...@gmail.com> writes: > Perhaps another variation > on this idea is to create a query walker that just looks for hasRowSecurity > flags throughout the tree (and to use that to mark the plan cache entry > appropriately).
That seems like a pretty plausible compromise position. So we'd redefine Query.hasRowSecurity as summarizing the situation for only the Query's own rtable entries, not recursively for sub-Queries. regards, tom lane