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
<https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql?view=sql-server-ver15#output_clause>
[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.

Reply via email to