Richard Guo <guofenglinux@gmail.com> writes:
> I realized the fix in v2 is not correct. The attnums generated by
> statext_is_compatible_clause is expected to be NOT offsetting by its
> caller, i.e. statext_mcv_clauselist_selectivity. Revise that in v3 patch
> by doing the offsetting when composing clause_attnums that need to have
> permission check.
Yeah, I was afraid that that route would require the patch to metastasize
into more places. Agreed on keeping the argument definition the same
and coping locally instead. But I don't think that you've done enough
to address the root cause of this bug, which is the woeful
under-documentation of the argument. I'll have a go at that part.
regards, tom lane