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

From Josh Berkus
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date
Msg-id 5481F2B5.1020208@agliodbs.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}  (Peter Geoghegan <pg@heroku.com>)
Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Anssi Kääriäinen <anssi.kaariainen@thl.fi>)
List pgsql-hackers
On 12/05/2014 07:59 AM, Robert Haas wrote:
> I think it's probably an important distinction, for the kinds of
> reasons Anssi mentions, but we should look for some method other than
> a system column of indicating it.  Maybe there's a magic function that
> returns a Boolean which you can call, or maybe some special clause, as
> with WITH ORDINALITY.

I thought the point of INSERT ... ON CONFLICT update was so that you
didn't have to care if it was a new row or not?

If you do care, it seems like it makes more sense to do your own INSERTs
and UPDATEs, as Django currently does.

I wouldn't be *opposed* to having a pseudocolumn in the RETURNed stuff
which let me know updated|inserted|ignored, but I also don't see it as a
feature requirement for 9.5.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [REVIEW] Re: Compression of full-page-writes
Next
From: Adam Brightwell
Date:
Subject: Re: Role Attribute Bitmask Catalog Representation