Re: Extending range type operators to cope with elements

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Extending range type operators to cope with elements
Дата
Msg-id 20190914204325.l6gkiobplneht3nk@development
обсуждение исходный текст
Ответ на Extending range type operators to cope with elements  (Esteban Zimanyi <ezimanyi@ulb.ac.be>)
Ответы Re: Extending range type operators to cope with elements  (Corey Huinker <corey.huinker@gmail.com>)
Список pgsql-hackers
On Fri, Sep 13, 2019 at 08:50:18AM +0200, Esteban Zimanyi wrote:
>Dear all
>
>While developing MobilityDB we needed to extend the range type operators so
>they cope with elements. In the same way that currently the range types
>support both
>- @> contains range/element
>- <@ element/range is contained by
>we extended the left (<<), overleft (&<), right (>>), and overright (&>)
>operators so they can cope with both elements and ranges at the left- or
>right-hand side. These can be seen in github
>https://github.com/ULB-CoDE-WIT/MobilityDB/blob/master/src/rangetypes_ext.c
>
>If you think that these extensions could be useful for the community at
>large, I can prepare a PR. Please let me know.
>

Well, we don't really use pull requests, but other than that I don't see
why not to at least consider such improvement.

I'm not a heavy user or range types, so I can't really judge how useful
that is in practice, but it seems like a fairly natural extension of the
existing operators. I mean, if I understand it correctly, the proposed
behavior is equal to treating the element as a "collapsed range".


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Create collation reporting the ICU locale display name
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: Extending range type operators to cope with elements