Re: RFC: Temporal Extensions for PostgreSQL - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: RFC: Temporal Extensions for PostgreSQL
Date
Msg-id 20070218200216.GC6828@svana.org
Whole thread Raw
In response to Re: RFC: Temporal Extensions for PostgreSQL  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
On Sun, Feb 18, 2007 at 08:14:00PM +0200, Hannu Krosing wrote:
> > but I can promise you you can't make it work with btree.
>
> Sorry to hear that. btree seemed like the best candidate for doing it.

The problem with btree is that it's designed to work with a compare
function which compares two datums and returns greater than, equal to
or less than. You can't build such an operator for intervals, so
there's a problem.

However, if you decree that a zero return value mean "collision for the
purposes of a unique index" then you could probably make it work.
*However* using it for lookups probably won't work very well then...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Plan invalidation design
Next
From: Tom Lane
Date:
Subject: Re: Plan invalidation design