View Single Post

   
  #4 (permalink)  
Old 04-09-2008, 08:27 AM
Andrew - Supernews
 
Posts: n/a
Default Re: Non-Overlaping date interval index

On 2006-02-18, "A. Kretschmer" <andreas.kretschmer@schollglas.com> wrote:
> am 18.02.2006, um 10:03:11 +0100 mailte Pailloncy Jean-Gerard folgendes:
>> I wonder how to have a sort of "uniq" index on date interval, such that
>> there is no date interval overlaping in the table.

>
> You can write a trigger to check the count of records which overlaps
> (start,end):


Doesn't work reliably due to the race condition, unless you lock the table
against conflicting inserts. The problem of course is that the trigger
doesn't see uncommitted rows from concurrent transactions.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Reply With Quote