On 2006-02-18, "A. Kretschmer" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to