Re: Operator class group proposal

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

Correct.

> 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
approach.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Companies Contributing to Open Source
Следующее
От: Tom Lane
Дата:
Сообщение: Re: recent --with-libxml support