Custom tstzrange with importance factored in

Started by Rares Pop (Treelet)over 2 years ago2 messages
#1Rares Pop (Treelet)
rares@treelet.net

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

#2Jeff Davis
pgsql@j-davis.com
In reply to: Rares Pop (Treelet) (#1)
Re: Custom tstzrange with importance factored in

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