Re: Range types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Range types
Date
Msg-id 15533.1260916041@sss.pgh.pa.us
Whole thread Raw
In response to Re: Range types  (Scott Bailey <artacus@comcast.net>)
Responses Re: Range types  (Scott Bailey <artacus@comcast.net>)
Re: Range types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Scott Bailey <artacus@comcast.net> writes:
> Ok, let me give an example of what we can do with the current 
> implementations that would not be possible with timestamps if we 
> implement as suggested. ...
> The function below takes two period arrays that can have overlapping and 
> adjacent elements. It subtracts all values in pa1 that intersect with 
> values in pa2. So perhaps pa1 is all of your work shifts for the month 
> and pa2 is a combination of your leave and holidays. The result is a 
> coalesced non-contiguous set of the times you would actually be working. 

The proposed problem is certainly soluble without any assumptions
of discreteness.  The answer might not look very much like the way
you chose to code it here, but that's not an argument for adopting
a fundamentally incorrect worldview.  If this were an amazingly
short and beautiful piece of code, it might support your argument,
but it's neither.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Compiling HEAD with -Werror int 64-bit mode
Next
From: Tom Lane
Date:
Subject: Re: Compiling HEAD with -Werror int 64-bit mode