The easiest way I found to simulate a INSERT OR UPDATE using PostgreSQL (or pretty much any other RDB) is using the INSERT INTO ... SELECT syntax:...

Read More ยป