Search Postgresql Archives

Re: challenging constraint situation - how do I make it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alban Hertroys <alban@xxxxxxxxxxxxxxxxx> writes:
> Are you refering to a 'timespan' data type that can be determined to be 
> unique?

> I can see some problems there, as both value and range matter; it'd be 
> similar to determining the uniqueness of an area in a rectangle (though 
> 1 dimensional only, of course).

Except that what you want is to forbid overlap, not forbid equality.
This is not possible with btree-based unique indexes, because btree
will not like an opclass whose "equality" member is not transitive.

If you look in the archives you'll find previous discussion of this
point, including some blue-sky speculation about whether GiST indexes
could be made to serve the purpose.  That's a long way from being a
solution you could use today, though.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux