Re: Per row status during INSERT .. ON CONFLICT UPDATE?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robins Tharakan <tharakan(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Per row status during INSERT .. ON CONFLICT UPDATE?
Date: 2015-05-19 17:49:29
Message-ID: 20150519174929.GD14931@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-05-19 17:54:31 Re: Per row status during INSERT .. ON CONFLICT UPDATE?
Previous Message Bruno Harbulot 2015-05-19 17:45:51 Re: Problems with question marks in operators (JDBC, ECPG, ...)