Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date: 2014-10-08 19:19:01
Message-ID: CAM3SWZRnks6naZjX=cxXCry9_+xNapF6nwjDPHPd6U0NhH0ecg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 8, 2014 at 12:12 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Mon, Sep 29, 2014 at 7:21 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> Having said that, it would be much nicer to have a mode that allows
>> you to just say the word "UPDATE" and have it copy the data into the
>> correct columns, like MySQL does. That is very intuitive, even if it
>> isn't very flexible.
>
> I thought about this, and at first I agreed, but now I'm not so sure.

Actually, I don't think MySQL supports this. It doesn't allow INSERT
ON DUPLICATE KEY UPDATE to do it, AFAICT. Their REPLACE syntax
supports that, but that's a feature that is quite distinct to what I
have in mind here.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-10-08 19:23:22 Re: Wait free LW_SHARED acquisition - v0.9
Previous Message Heikki Linnakangas 2014-10-08 19:13:46 What exactly is our CRC algorithm?