Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group