Output clause for Upsert aka INSERT...ON CONFLICT - Mailing list pgsql-hackers

From Anand Sowmithiran
Subject Output clause for Upsert aka INSERT...ON CONFLICT
Date
Msg-id CAKbQ4s6v+Zj8WXgjNtBnmTDNHQsiGC5eeH+oRPG9ufG=Vv+tvw@mail.gmail.com
Whole thread Raw
Responses Re: Output clause for Upsert aka INSERT...ON CONFLICT
Re: Output clause for Upsert aka INSERT...ON CONFLICT
Re: Output clause for Upsert aka INSERT...ON CONFLICT
List pgsql-hackers
The INSERT...ON CONFLICT is used for doing upserts in one of our app. 
Our app works with both MS SQL and Postgresql, based on customer needs.

Unlike the MS SQL MERGE command's OUTPUT clause that gives the $action [INSERT / UPDATE  /DELETE] that was done during the upsert, the RETURNING clause of the pgsql does not return the action done. 
We need this so that the application can use that for auditing and UI purposes.
Is there any workaround to get this info ?
Or is there a way this enhancement can be requested in future PG versions ?

thanks,
Anand.

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Two noncritical bugs of pg_waldump
Next
From: Michael Paquier
Date:
Subject: Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?