Re: range_agg

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: range_agg
Дата
Msg-id 2ab176f136f0fda560f63cd091875bf21c4fe7df.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: range_agg  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-hackers
On Fri, 2019-07-05 at 10:57 -0700, Paul A Jungwirth wrote:
> I take it that a multirange contains of *disjoint* ranges, so instead
> of {[1,2), [2,3), [6,7)} you'd have {[1,3), [6,7)}. Jeff does that
> match your expectation?

Yes.

> I just realized that since weighted_range_agg and covering_range_agg
> return tuples of (anyrange, integer) (maybe other numeric types
> too?),
> their elements are *not ranges*, so they couldn't return a
> multirange.
> They would have to return an array of those tuples.

I think you are right. I was originally thinking a multirange and an
array of weights would work, but the multirange would coalesce adjacent
ranges because it would have no way to know they have different
weights.

Regards,
    Jeff Davis





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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: range_agg
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: doc: improve PG 12 to_timestamp()/to_date() wording