On Thu, Jan 27, 2022 at 10:24:14AM +0530, Anand Sowmithiran wrote: > 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 ?
Thomas already answered about the xmax hack, but I dug these up in the meantime.