2 ms·
The MERGE itself is atomic, but it doesn't prevent duplicate insertions without a lock: http://stackoverflow.com/questions/9871644/is-merge-an-atomic-statement-
by mjn 13y ago
The MERGE itself is atomic, but it doesn't prevent duplicate insertions without a lock: http://stackoverflow.com/questions/9871644/is-merge-an-atomic-statement-in-sql2008 http://stackoverflow.com/questions/9871644/is-merge-an-atomi...
- jeltz 13y agoIf PostgreSQL goes with an implementation of MERGE like that then it would not be a replacement for UPSERT. With UPSERT you can make sure to never get any constraint violations.