Re: reservation overlap constraint checking?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Aditya <aditya(at)grot(dot)org>
Cc: sfpug(at)postgresql(dot)org
Subject: Re: reservation overlap constraint checking?
Date: 2005-05-20 19:50:34
Message-ID: 200505201250.34634.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Adi,

> so it turns out the best I can come up with is to use a function that
> returns a boolean since that works fine in a table constraint:

Constraints should never involve queries against rows other than the one being
updated. This is not guarenteed to be stable, nor to back up and restore
correctly.

Use a trigger instead of a constraint.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse sfpug by date

  From Date Subject
Next Message Jeff Frost 2005-05-21 00:58:45 pg_dump/pg_restore in 8.0.3 dependency checking?
Previous Message Josh Berkus 2005-05-20 19:45:25 Re: reservation overlap constraint checking?