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

From Andreas Kretschmer
Subject Re: Non-Overlaping date interval index
Date
Msg-id 20060218183852.GA9837@KanotixBox
Whole thread Raw
In response to Re: Non-Overlaping date interval index  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
A. Kretschmer <andreas.kretschmer@schollglas.com> schrieb:

> am  18.02.2006, um 10:03:11 +0100 mailte Pailloncy Jean-Gerard folgendes:
> > Hi,
> >
> > I wonder how to have a sort of "uniq" index on date interval, such  that
> > there is no date interval overlaping in the table.
> >
> > exemple:
> > create table test (start timestamp, end timestamp);
> > with the constraint: end > start
>
> You can write a trigger to check the count of records which overlaps
> (start,end):

Sorry, there are a problem:

the trigger can't see uncommitted inserts from concurrent transactions.

Thanks to AndrewSN for this hint.



Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

pgsql-general by date:

Previous
From: David Rio Deiros
Date:
Subject: Re: C trigger using system(3) to execute a php script
Next
From: Michael Fuhr
Date:
Subject: Re: C trigger using system(3) to execute a php script