From: | Andrew - Supernews <andrew+nonews(at)supernews(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Non-Overlaping date interval index |
Date: | 2006-02-18 18:29:08 |
Message-ID: | slrndveprk.omm.andrew+nonews@atlantis.supernews.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2006-02-18, "A. Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2006-02-18 18:38:52 | Re: Non-Overlaping date interval index |
Previous Message | Peter Eisentraut | 2006-02-18 17:57:32 | Re: Mixing different LC_COLLATE and database encodings |