Re: range_agg
От
Corey Huinker
Тема
Re: range_agg
Дата
Msg-id
CADkLM=dP8f8T0oDxOsYWDacZO9ydj3o5xgr7aTvhZgQWonm3Bw@mail.gmail.com
Ответ на
range_agg (Paul Jungwirth)
Список
Дерево обсуждения
range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Thomas Munro <thomas.munro@gmail.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Isaac Morland <isaac.morland@gmail.com>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg David Fetter <david@fetter.org>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Robert Haas <robertmhaas@gmail.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Alvaro Herrera <alvherre@2ndquadrant.com>
Re: range_agg Tom Lane <tgl@sss.pgh.pa.us>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg "David G. Johnston" <david.g.johnston@gmail.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Paul A Jungwirth <pj@illuminatedcomputing.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Jeff Davis <pgsql@j-davis.com>
Re: range_agg Pavel Stehule <pavel.stehule@gmail.com>
Re: range_agg Corey Huinker <corey.huinker@gmail.com>
Re: range_agg Paul Jungwirth <pj@illuminatedcomputing.com>
One question is how to aggregate ranges that would leave gaps and/or
overlaps. So in my extension there is a one-param version that forbids
gaps & overlaps, but I let you permit them by passing extra parameters,
so the signature is:
Perhaps a third way would be to allow and preserve the gaps.
A while back I wrote an extension called disjoint_date_range for storing sets of dates where it was assumed that most dates would be contiguous. The basic idea was that The core datatype was an array of ranges of dates, and with every modification you'd unnest them all to their discrete elements and use a window function to identify "runs" of dates and recompose them into a canonical set. It was an efficient way of representing "Every day last year except for June 2nd and August 4th, when we closed business for special events."
For arrays of ranges the principle is the same but it'd get a bit more tricky, you'd have to order by low bound, use window functions to detect adjacency/overlap to identify your runs, and the generate the canonical minimum set of ranges in your array.
A while back I wrote an extension called disjoint_date_range for storing sets of dates where it was assumed that most dates would be contiguous. The basic idea was that The core datatype was an array of ranges of dates, and with every modification you'd unnest them all to their discrete elements and use a window function to identify "runs" of dates and recompose them into a canonical set. It was an efficient way of representing "Every day last year except for June 2nd and August 4th, when we closed business for special events."
For arrays of ranges the principle is the same but it'd get a bit more tricky, you'd have to order by low bound, use window functions to detect adjacency/overlap to identify your runs, and the generate the canonical minimum set of ranges in your array.
В списке pgsql-hackers по дате отправления
От: Peter Geoghegan
Дата: