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