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

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: (view raw, whole thread or download thread mbox)
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

In response to


pgsql-hackers by date

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

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