* The comments for statext_is_compatible_clause suck. If they'd defined what the arguments are, perhaps this mess would have been prevented. For extra credit, it'd be really nice to define what "is compatible" means. I'd sure not have thought that that would include permissions checks.
I think by 'compatible' it just means the clause is in the form that can be estimated using MCV lists. Maybe we can define it as that.
In statext_is_compatible_clause() we have the permission checks to see if we are allowed to read all required attributes, which indeed needs to be mentioned in the function comments.