Re: Proposed new create command, CREATE OPERATOR CLASS

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposed new create command, CREATE OPERATOR CLASS
Дата
Msg-id 10397.1004375935@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposed new create command, CREATE OPERATOR CLASS  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-hackers
Oleg Bartunov <oleg@sai.msu.su> writes:
> this is interesting question - do we really need commutator to get
> postgres to use index. This is the only reason we created  ~~ operator.

AFAIR there is not a requirement to have a commutator link.  However
the indexable operation has to be framed as "indexedvar OP constant".
If the natural way to write it is as "constant OP indexedvar" then
you won't get an indexscan unless it can be commuted to the other way.
The same issue arises if you think that the operator might be useful
in joins.
        regards, tom lane


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

Предыдущее
От: "Sean K. Sell"
Дата:
Сообщение: External Database Connection
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [patch] helps fe-connect.c handle -EINTR more gracefully