Re: Per row status during INSERT .. ON CONFLICT UPDATE? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Per row status during INSERT .. ON CONFLICT UPDATE?
Date
Msg-id 20150519174929.GD14931@alap3.anarazel.de
Whole thread Raw
In response to Per row status during INSERT .. ON CONFLICT UPDATE?  (Robins Tharakan <tharakan@gmail.com>)
Responses Re: Per row status during INSERT .. ON CONFLICT UPDATE?  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 2015-05-19 17:53:09 +0530, Robins Tharakan wrote:
> Is there a way to know which rows were INSERTed and UPDATEd when doing a
> INSERT ... ON CONFLICT UPDATE? Probably via pseudo column indicating INSERT
> / UPDATE ?

No, not really.

> The RETURNING clause just allows us to return columns, but am unable to
> find a way to know 'what' happened to a given row.

There previously has been discussion about extending RETURNING to allow
to return the before/after row. But to me that's a mostly independent
feature to ON CONFLICT.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Bruno Harbulot
Date:
Subject: Re: Problems with question marks in operators (JDBC, ECPG, ...)
Next
From: Peter Geoghegan
Date:
Subject: Re: Per row status during INSERT .. ON CONFLICT UPDATE?