| From: | Josh Berkus <josh(at)agliodbs(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com> |
| Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
| Date: | 2014-12-05 18:00:21 |
| Message-ID: | 5481F2B5.1020208@agliodbs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adam Brightwell | 2014-12-05 18:01:19 | Re: Role Attribute Bitmask Catalog Representation |
| Previous Message | Robert Haas | 2014-12-05 17:08:30 | Re: [REVIEW] Re: Compression of full-page-writes |