Re: operators, operator classes, Btree and index usage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: operators, operator classes, Btree and index usage
Дата
Msg-id 17673.1125692503@sss.pgh.pa.us
обсуждение исходный текст
Ответ на operators, operator classes, Btree and index usage  ("Sergey E. Koposov" <math@sai.msu.ru>)
Ответы Re: operators, operator classes, Btree and index usage  ("Sergey E. Koposov" <math@sai.msu.ru>)
Список pgsql-general
"Sergey E. Koposov" <math@sai.msu.ru> writes:
> I'm interested in simplifying those queries and introducing the operator
> doing something like this:

> my_operator(bigint x, bigint[] arr)
> checking  the condition:
> ((x>arr[1]) AND (x<arr[2])) OR ((x>arr[3]) AND (x<arr[4]))

This could be made to work if you define the above as an inline-able SQL
function.  Hacking operator classes won't do it though.

            regards, tom lane

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

Предыдущее
От: "Sergey E. Koposov"
Дата:
Сообщение: operators, operator classes, Btree and index usage
Следующее
От: Poul Møller Hansen
Дата:
Сообщение: Re: Check if SELECT is granted