On Fri, Nov 18, 2022 at 9:36 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Actually, looking at get_attstatslot, I realize it was already designed
> to do that -- just pass zero for flags. So we could do it as attached.
Yes, it is. Using zero flag would short-cut get_attstatsslot() to just
return whether the slot type exists without loading it. Do you think we
need to emphasize this use case in the comments for 'flags'? It seems
currently there is no such use case in the codes on HEAD.
I wonder whether we need to also check statistic_proc_security_check()
when determining if MCVs exists in both sides.
Thanks
Richard