Re: interval origami
От | Joe Conway |
---|---|
Тема | Re: interval origami |
Дата | |
Msg-id | eed7d93d-2db6-c5af-8623-fa5f492b2e4d@joeconway.com обсуждение исходный текст |
Ответ на | Re: interval origami (Adam Jensen <hanzer@riseup.net>) |
Ответы |
Re: interval origami
|
Список | pgsql-sql |
On 11/30/18 4:02 PM, Adam Jensen wrote: > On 11/30/18 3:19 PM, Adam Jensen wrote: >> The 'numrange' type with the 'overlaps' and 'intersection' operators >> seem to cover the fundamental computations in a very natural way. > > Actually, those operators might not be entirely sufficient. Given two > ranges like this: > > 10.0|39.0|interesting > 15.0|21.0|fail > > Something like the negative or inverse of the intersection is needed: > > 10.0|15.0|interesting > 21.0|39.0|interesting Perhaps overkill, but if you represent your timeline as actual line segments, perhaps PostGIS would be useful. E.g.: https://postgis.net/docs/manual-2.5/ST_Difference.html HTH, Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
В списке pgsql-sql по дате отправления: