Aditya,
> however, that seems less than elegant because there is time between the
> check and the insert for a competing entry to get inserted....so next thing
> to try is a constratint:
Use a transaction and "select for update".
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco