Re: Non-Overlaping date interval index

Поиск
Список
Период
Сортировка
От Andrew - Supernews
Тема Re: Non-Overlaping date interval index
Дата
Msg-id slrndveprk.omm.andrew+nonews@atlantis.supernews.net
обсуждение исходный текст
Ответ на Non-Overlaping date interval index  (Pailloncy Jean-Gerard <jg@rilk.com>)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Mixing different LC_COLLATE and database encodings
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Mixing different LC_COLLATE and database encodings