Re: Partial match in GIN

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Partial match in GIN
Дата
Msg-id 87tzic4gwv.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Partial match in GIN  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-patches
"Teodor Sigaev" <teodor@sigaev.ru> writes:

>  - compare function has third (optional) argument, of boolean type, it points to
>    kind of compare: partial or exact match. If argument is equal to 'false',
>    function should produce comparing as usual, else function's result is
>    treated as:
>        = 0  - match
>        < 0  - doesn't match but continue scan
>        > 0  - stop scan

Perhaps a minor point but I think this would be cleaner as a separate opclass
function with a separate support number rather than overloading the comparison
function.

Then if the support function is there it supports that type of scan and if it
doesn't then it doesn't, rather than depending on a magic third argument to
completely change behaviour.

You can always share code using an internal function or if the behaviour is
identical just register the same function twice.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's Slony Replication support!

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Indexam API changes
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Partial match in GIN