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: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Operator class group proposal
Date: 2006-12-14 17:00:00
Message-ID: 87mz5qifan.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:

> I'm not sure. The problem that I'm seeing is that currently, cross-type
> comparisons go into the opclass associated with their left-hand argument
> type. Therefore, if say you want to add "tinyint" to an opclass group,
> you not only need to add an opclass for tinyint (containing tinyint vs
> tinyint as well as tinyint vs other-type operators), but you also need
> to add other-type vs tinyint operators to the *other* members of the
> group. So the notion of the classes being separate objects seems a bit
> artificial to me. I think that "if I want to make tinyint part of the
> numeric_ops index opclass, I just add the type and all these operators to
> that opclass" is at least as clear.

Hm, would we still need all the cross-data-type btree operators? Could the
planner be taught that as long as the two types belong to the same
opclassclass that it's ok to use a btree operator that requires a cast first
before being used?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-12-14 17:06:18 Re: Security leak with trigger functions?
Previous Message Dave Page 2006-12-14 16:49:22 Re: libpq.a in a universal binary