Re: INSERT ... ON CONFLICT syntax issues

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: INSERT ... ON CONFLICT syntax issues
Date: 2015-04-27 23:09:53
Message-ID: CAM3SWZSy_7A+St+1cHqYqTPmM3PSp6mJ_YQhDUziuJ4qF4XP3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 27, 2015 at 1:19 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> it appears that they are using quite a different syntax. The ON
> CONFLICT clause is attached to a constraint, specifying the default
> action for that constraint. The INSERT command can then override this
> default choice. I think.

Well, MySQL's ON DUPLICATE KEY UPDATE thing is pretty close to what I
have. I intend CONFLICT as a broader term, which is somewhat similar
to SQLite (and is not needlessly verbose).

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-04-27 23:18:49 PATCH: pgbench - remove thread fork-emulation
Previous Message Dave Jones 2015-04-27 23:08:45 Re: Temporal extensions