From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SQL MERGE is quite distinct from UPSERT |
Date: | 2014-07-21 05:40:47 |
Message-ID: | 53CCA7DF.1020401@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/21/2014 01:40 AM, Martijn van Oosterhout wrote:
> FWIW, I agree. MERGE is hard enough as it is, but trying to
> guarentee some kind of atomicity makes it nigh on impossible.
> Indeed, after reading what you wrote I think it may well be
> impossible to make it atomic *and* make it perform in the general
> case.
>
> So, +1 UPSERT.
I totally agree. Particularly because MERGE-like behaviour is already
possible with wCTEs and/or table locking. It's not beautiful, but
neither is MERGE.
- --
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTzKfbAAoJELBXNkqjr+S2GhIIALAMmpMuQiMqsJ/GHjCfeXYQ
Tb3dO0ocBgpk8CobGEVjDnLOh4Rfqt4XZ9pEGr38XEmmzfjc2nEczk+PFq+bRKki
d9lRk8BDH5fcyIYfCNXbycUBbJ/b+inLdhZI0wp3kGX6V1MWTuOquTp8NTbTzvcL
tJXRyWEqsMuXIA26B31W3AkLAFaFF7fpZiD91SI7ECozg1Qr+Ey5tTjJj1+ErzAC
5MnK4nSwwbFTdS7SaOmzzfGKT7BoSlbAXbF8gshbBA5IPU7FxfBcvAquxpPalF73
/949kneIWDA3Qux73wmr182ph4U8usgODA0Iq6QAHa4IPJWFfCvyRA9vt6P86oM=
=vVI+
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-07-21 05:41:54 | Re: SQL MERGE is quite distinct from UPSERT |
Previous Message | Marko Tiikkaja | 2014-07-20 23:15:12 | Re: 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT .. |