Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date
Msg-id CABRT9RD-4M-STEXth7tvmM8Z6xCGTKzj9OpfWRuhcPiKMPDg6w@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
Responses Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
List pgsql-hackers
On Wed, Oct 8, 2014 at 3:47 AM, Peter Geoghegan <pg@heroku.com> wrote:
> It seems like what you're talking about here is just changing the
> spelling of what I already have.

I think there's a subtle difference in expectations too. The current
BEFORE INSERT trigger behavior is somewhat defensible with an
INSERT-driven syntax (though I don't like it even now [1]). But the
MERGE syntax, to me, strongly implies that insertion doesn't begin
before determining whether a conflict exists or not.

[1] http://www.postgresql.org/message-id/CABRT9RD6zriK+t6mnqQOqaozZ5z1bUaKh+kNY=O9ZqBZFoAuBg@mail.gmail.com

Regards,
Marti



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Promise index tuples for UPSERT
Next
From: Paweł Cesar Sanjuan Szklarz
Date:
Subject: Context lenses to set/get values in json values.