From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Warren Turkal <wt(at)penguintechs(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: RFC: Temporal Extensions for PostgreSQL |
Date: | 2007-02-17 20:18:42 |
Message-ID: | 20070217201842.GC17174@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Feb 17, 2007 at 11:40:44AM -0700, Warren Turkal wrote:
> On Saturday 17 February 2007 09:26, Tom Lane wrote:
> > "Overlapping" is not an equality relation (it fails the transitive law),
> > so I'm not entirely sure what "unique" means in this context ... but I
> > can promise you you can't make it work with btree.
>
> There is an equality relation on periods. But it wouldn't really tell you much
> useful info, as it's not normally what you're looking for with time.
What he's referring to is that "overlaps" is not transitive. i.e. if A
overlaps B and B overlaps C then A doesn't necessarily overlap C.
However, non-overlapping intervals are stricly ordered, so if you
reject overlaps from the index then new intervals can each only be
inserted into one place. However, the locking required is probably
non-trivial.
Get unique indexes for GiST working and you're home...
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-17 20:24:48 | Re: GiST Comparing IndexTuples/Datums |
Previous Message | Tom Lane | 2007-02-17 19:43:14 | Re: patch adding new regexp functions |