Re: Operator class group proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Operator class group proposal
Date: 2006-12-23 03:42:23
Message-ID: 6347.1166845343@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <gsstark(at)mit(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2006-12-23 03:57:31 Re: Interface for pg_autovacuum
Previous Message Shane Ambler 2006-12-23 02:47:27 Strange pgsql crash on MacOSX