How do people implement insert or upate ( otherwise known as upsert ) behaviour in postgres i.e. insert a row if it's key does not exist in the database else update the existing row?
You can simply send the UPDATE, if nothing was updated, it's safe to send the INSERT