Re: Operator class group proposal

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Operator class group proposal
Дата
Msg-id 878xh00w54.fsf@enterprisedb.com
обсуждение исходный текст
Ответ на Operator class group proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Operator class group proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: configure problem --with-libxml
Следующее
От: Jeremy Drake
Дата:
Сообщение: recent --with-libxml support