From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Esteban Zimanyi <ezimanyi(at)ulb(dot)ac(dot)be> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Extending range type operators to cope with elements |
Date: | 2019-09-14 21:09:10 |
Message-ID: | 20190914204325.l6gkiobplneht3nk@development |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Corey Huinker | 2019-09-14 22:35:52 | Re: Extending range type operators to cope with elements |
Previous Message | Peter Geoghegan | 2019-09-14 20:46:01 | Re: Create collation reporting the ICU locale display name |