| From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
|---|---|
| To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
| Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com> |
| Subject: | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
| Date: | 2014-09-29 07:02:35 |
| Message-ID: | 20140929070235.GP1169@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2014-09-29 09:51:45 +0300, Heikki Linnakangas wrote:
> That said, it would be handy if the syntax was closer to MERGE. Aside from
> the concurrency issues, it does the same thing, right? So how about making
> the syntax identical to MERGE, except for swapping the MERGE keyword with
> e.g. UPSERT?
I don't think that's a good idea. What most people are missing is an
*easy* way to do upsert, that's similar to the normal INSERT. Not
something with a pretty different syntax. That's why INSERT OR REPLACE
and stuff like that was well adopted.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2014-09-29 07:19:54 | Re: Add generate_series(numeric, numeric) |
| Previous Message | Heikki Linnakangas | 2014-09-29 06:51:45 | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |