Subject: Custom tstzrange with importance factored in

From: "Rares Pop (Treelet)" <[email-masked]>
Date: Fri, 6 Oct 2023 16:55:18 +0300

Hi,

I want to make a custom range (and multirange type) that carries a few useful details. 
Looks like I may have to implement the operators, custom functions and my own aggregator.
Where can I find the code SQL code for anything that relates to the tstzrange range type?

Or would you recommend a different approach?
I essentially want to be able to aggregate multiple tstzranges - each range with its own importance. The aggregation would be like a a join/intersect where ranges with higher importance override the ones with lower importance.

Thanks!
Rares

---

From: Jeff Davis <[email-masked]>
Date: Wed, 25 Oct 2023 12:02:40 -0700

On Fri, 2023-10-06 at 16:55 +0300, Rares Pop (Treelet) wrote:
> I essentially want to be able to aggregate multiple tstzranges - each
> range with its own importance. The aggregation would be like a a
> join/intersect where ranges with higher importance override the ones
> with lower importance.

It may be possible without a new data type. Can you describe the
semantics more precisely?

Regards,
	Jeff Davis