Re: Range types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Range types
Date: 2009-12-15 22:27:21
Message-ID: 15533.1260916041@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Scott Bailey <artacus(at)comcast(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-15 22:38:43 Re: Compiling HEAD with -Werror int 64-bit mode
Previous Message Peter Eisentraut 2009-12-15 22:24:46 Re: Compiling HEAD with -Werror int 64-bit mode