Re: Exclusion constraint issue - Mailing list pgsql-general

From Jeff Davis
Subject Re: Exclusion constraint issue
Date
Msg-id 1285711620.19812.7.camel@jdavis-ux.asterdata.local
Whole thread Raw
In response to Re: Exclusion constraint issue  (Eric McKeeth <eldin00@gmail.com>)
Responses Re: Exclusion constraint issue  (Eric McKeeth <eldin00@gmail.com>)
List pgsql-general
On Tue, 2010-09-28 at 12:18 -0600, Eric McKeeth wrote:

> This is ugly, but it does seem to enforce the constraint I need, of
> non-overlapping dates where sharing an endpoint is not considered an
> overlap.

The period type supports different inclusivity/exclusivity combinations.
So, the period:

   '[2009-01-02, 2009-01-03)'

Does not overlap with:

   '[2009-01-03, 2009-01-04)'

Because "[" or "]" means "inclusive" and "(" or ")" means "exclusive".

For further discussion, you can join the temporal-general@pgfoundry.org
mailing list (sign up at
http://pgfoundry.org/mailman/listinfo/temporal-general ). If this still
does not solve your use case, I'd like to see if it can be modified to
do so.

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Behavior of parameter holders in query containing a '$1'
Next
From: Bartlomiej Korupczynski
Date:
Subject: Re: UPDATE/DELETE with ORDER BY and LIMIT