Search Postgresql Archives

Re: Non-Overlaping date interval index

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

 



On 2006-02-18, "A. Kretschmer" <andreas.kretschmer@xxxxxxxxxxxxxx> 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


[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