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 <stark(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Operator class group proposal
Date: 2006-12-22 18:06:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> I thought that would just be formalizing what we currently have. But I just
> discovered to my surprise tat it's not. I don't see any cross-data-type
> operators between any of the integer types and numeric, or between any of the
> floating point types and numeric, or between any of the integers and the
> floating point types.


> So does that mean we currently have three separate arithmetic "operator class
> groups" such as they currently exist and you can't currently do merge joins
> between some combinations of these arithmetic types?

No, what you'll get is something like

	int4var::float8 float8eq float8var

which is perfectly mergejoinable ... however, it's not clear that the
planner will make very good estimates about the value of the cast
expression.  I'm not sure if it's worth introducing a pile more
crosstype operators to change that situation --- improving
the selectivity functions to handle casts better might be a wiser

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2006-12-22 18:16:43
Subject: Re: recent --with-libxml support
Previous:From: Bruce MomjianDate: 2006-12-22 17:56:30
Subject: Re: Companies Contributing to Open Source

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