Re: Operator class group proposal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Operator class group proposal
Date
Msg-id 6347.1166845343@sss.pgh.pa.us
Whole thread Raw
In response to Re: Operator class group proposal  (Gregory Stark <gsstark@mit.edu>)
Responses Re: Operator class group proposal
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Shane Ambler
Date:
Subject: Strange pgsql crash on MacOSX
Next
From: Tom Lane
Date:
Subject: Re: Strange pgsql crash on MacOSX