Possible Duplicate:
Cannot SELECT from UPDATE RETURNING clause in postgres
I am using a PostgreSQL database which has a "company" table and a "country" table which each have a uniqueID.
I want a setup where if I try to add a company to the database, it only adds the company to the database with a new unique ID if it doesn't already exist.