From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Peter Geoghegan <pg(at)heroku(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 09:14:21 |
Message-ID: | CA+U5nMJSsGhiOPUmQdYYxmhxLj6dZeN09UzG6KO8F9vY0d=rbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 29 September 2014 08:02, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> 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.
We have 3 choices...
1. SQL Standard MERGE (or a subset)
2. MySQL Compatible syntax
3. Something completely different
If we go for (3), I would like to see a long and detailed explanation
of what is wrong with (1) and (2) before we do (3). That needs to be
clear, detailed, well researched, correct and agreed. Otherwise when
we release such a feature, people will ask, why did you do that? And
yet nobody will remember.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-09-29 09:27:59 | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
Previous Message | Andres Freund | 2014-09-29 09:13:43 | Re: Turning off HOT/Cleanup sometimes |