Hi. I've always had trouble understanding how to properly deal with the following case. I need to run an insert on a table but I don't want any other transactions to commit the insert before me. Within the logic of the program, I run a select to see if there is a value there, then the insert. Between these 2 statements someone could commit one that causes the insert to fail. Is there a better way to do this than locking the table in SHARE ROW EXCLUSIVE MODE and trying to be certain that anything else that may call an insert there asks for the same type of lock? -Michael _________________________________________________________________ http://fastmail.ca/ - Fast Free Web Email for Canadians