On Thu, Mar 27, 2008 at 03:34:49PM -0700, Adrian Klaver wrote: > Or a simpler way to do handle my previous suggestion: > > IF (ret_email IS NULL ) OR (ret_email='') THEN > RETURN ('-3') That would be the sane fix, yes. Based on the previous emails from the OP, he seems to be missing a lot of the tools that databases' give you. Transactions and unique constraints being two significant ones. Writing stored procedures to do their work is just going to introduce unnecessary bugs and complication. Sam -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general