On 06/30/2012 09:02 PM, Andrus wrote:
You want an operation that's called an UPSERT or MERGE operation. PostgreSQL doesn't have any native support to do this for you. Doing it right is surprisingly tricky. This is the best article I've seen on the topic: http://www.depesz.com/2012/06/10/why-is-upsert-so-complicated/ -- Craig Ringer |