Gregory Stark <gsstark@mit.edu> writes:
> So the only reason we needed the cross-data-type operators was to get better
> estimates? I thought without them you couldn't get an index-based plan at all.
Oh, hm, there is that --- you won't get a nestloop with inner indexscan
unless the join expression uses the unmodified inner variable (unless
you do something weird like provide an index on the casted value...)
However, we need to be pretty wary about widening the families unless
we're sure that the semantics are right. In particular, I think that
numeric-vs-float crosstype operators would violate the transitive law:
you could have values for which A=B and B=C but A!=C. This is because
we smash numerics to float for comparison, and so there are distinct
numeric values that can compare equal to the same float. bigint against
float same problem. It'd be OK to integrate integers and numeric into
one class, but how much real value is there in that?
regards, tom lane