Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE - Mailing list pgsql-bugs

From Randy Westlund
Subject Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE
Date
Msg-id 20160125184825.GB44462@gmail.com
Whole thread Raw
In response to Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE  (Marko Tiikkaja <marko@joh.to>)
List pgsql-bugs
On Mon, Jan 25, 2016 at 11:00:38AM +0100, Marko Tiikkaja wrote:
> On 25/01/16 08:48, rwestlun@gmail.com wrote:
> > I believe postgres should be returning "UPDATE" here instead of "INSERT"
> > because I see no way to know which operation took place.
>=20
> That seems a bit short-sighted.  What should happen if one row was added=
=20
> and one updated?

That's a good point. I'm not sure what the proper way to determine which
operation took place should be :/

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #13884: array_to_json() works incorrectly for non-0-based arrays
Next
From: Gavin Flower
Date:
Subject: Re: BUG #13883: Very Important Facility