News for hackers. Stuff that matters.
Re:PostgreSQL 9.3 Beta 1 Released by psadauskas on Monday May 13, 2013 @07:46PM (#5702179)
Here's an UPSERT in postgresql: https://gist.github.com/paul/855efdecaaa2ec4deec7

While we're at it, here's a "find or create" in a single atomic statement: https://gist.github.com/paul/75ec84d131e36492b17b

Re:PostgreSQL 9.3 Beta 1 Released by ocharles on Tuesday May 14, 2013 @04:51AM (#5703664)
I believe both of these still have race conditions, and are not the same as truly atomic upserts. Granted the window is considerably smaller, but their is still a race condition.