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

From Peter Geoghegan
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date
Msg-id CAM3SWZTFHcfGSQRNBWKeZxXo6W9Wj4pBSGHbsL1xDV778+5cYQ@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}  (Andreas Karlsson <andreas@proxel.se>)
Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Anssi Kääriäinen <anssi.kaariainen@thl.fi>)
List pgsql-hackers
On Mon, Nov 10, 2014 at 3:33 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Attached is V1.4.

Someone mentioned to me privately that they weren't sure that the
question of whether or not RETURNING only projected actually inserted
tuples was the right one. Also, I think someone else mentioned this a
few months back. I'd like to address this question directly sooner
rather than later, and so I've added a note on the Wiki page in
relation to this [1]. It's a possible area of concern at this point.

Anyway, it wouldn't require much implementation effort to change the
behavior so that updated tuples were also projected. In addition, we
might also consider the necessity of inventing a mechanism to make
apparent whether the tuple was inserted or updated. The discussion
needs to happen first, though.

[1] https://wiki.postgresql.org/wiki/UPSERT#RETURNING_behavior
-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: RLS with check option - surprised design
Next
From: Michael Paquier
Date:
Subject: Re: New Event Trigger: table_rewrite