Re: Non-Overlaping date interval index - Mailing list pgsql-general

From Andrew - Supernews
Subject Re: Non-Overlaping date interval index
Date
Msg-id slrndveprk.omm.andrew+nonews@atlantis.supernews.net
Whole thread Raw
In response to Non-Overlaping date interval index  (Pailloncy Jean-Gerard <jg@rilk.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Mixing different LC_COLLATE and database encodings
Next
From: Tom Lane
Date:
Subject: Re: Mixing different LC_COLLATE and database encodings