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:45:25
Message-ID: 200505201245.25229.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Adi,

> Sorry, I'm unclear on how this would help since I'm worried about an
> intervening insert rather than an update. Am I missing something?

Oh, yeah, you're right. You'd have to exclusive lock the table.

What you want to do really doesn't work as a constraint. Even as a trigger,
it would be querying the entire table every time you do an insert. THough I
suppose you're doing that anyway.

And what about updates?

Perhaps you do want a BEFORE INSERT OR UPDATE trigger ...

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse sfpug by date

  From Date Subject
Next Message Josh Berkus 2005-05-20 19:50:34 Re: reservation overlap constraint checking?
Previous Message Aditya 2005-05-20 19:44:32 Re: reservation overlap constraint checking?