Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE

From: Randy Westlund <rwestlun(at)gmail(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE
Date: 2016-01-25 18:48:25
Message-ID: 20160125184825.GB44462@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jan 25, 2016 at 11:00:38AM +0100, Marko Tiikkaja wrote:
> On 25/01/16 08:48, rwestlun(at)gmail(dot)com wrote:
> > I believe postgres should be returning "UPDATE" here instead of "INSERT"
> > because I see no way to know which operation took place.
>
> That seems a bit short-sighted. What should happen if one row was added
> and one updated?

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Gavin Flower 2016-01-25 19:00:46 Re: BUG #13883: Very Important Facility
Previous Message Xtra Coder 2016-01-25 17:47:04 Re: BUG #13885: float->string conversion loses precision server-side on JDBC connection