Re: Operator class group proposal

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Operator class group proposal
Date: 2006-12-22 15:48:23
Message-ID: 878xh00w54.fsf@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> A class group is associated with a specific index AM and can contain only
> opclasses for that AM. We might for instance invent "numeric" and
> "numeric_reverse" groups for btree, to contain the default opclasses and
> reverse-sort opclasses for the standard arithmetic types.

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?

What puzzles me is that we used to have problems with bigint columns where
people just did "WHERE bigint_col = 1". But my testing shows similar constructs
between integer and numeric or other types with no cross-data-type comparator
don't lead to similar problems. The system happily introduces casts now and
uses the btree operator. So I must have missed another change that was also
relevant to this in addition to the cross datatype operators.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Drake 2006-12-22 17:46:35 recent --with-libxml support
Previous Message Tom Lane 2006-12-22 14:51:27 Re: configure problem --with-libxml