Output clause for Upsert aka INSERT...ON CONFLICT

Поиск
Список
Период
Сортировка
От Anand Sowmithiran
Тема Output clause for Upsert aka INSERT...ON CONFLICT
Дата
Msg-id CAKbQ4s6v+Zj8WXgjNtBnmTDNHQsiGC5eeH+oRPG9ufG=Vv+tvw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Output clause for Upsert aka INSERT...ON CONFLICT  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Output clause for Upsert aka INSERT...ON CONFLICT  (Thomas Munro <thomas.munro@gmail.com>)
Re: Output clause for Upsert aka INSERT...ON CONFLICT  (Justin Pryzby <pryzby@telsasoft.com>)
Список 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 по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Two noncritical bugs of pg_waldump
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?