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 <firstname.lastname@example.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
Description: Digital signature