Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE
Дата
Msg-id 56A5F246.3070300@joh.to
обсуждение исходный текст
Ответ на BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE  (rwestlun@gmail.com)
Ответы Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE  (Randy Westlund <rwestlun@gmail.com>)
Re: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-bugs
On 25/01/16 08:48, rwestlun@gmail.com wrote:
> I believe postgres should be returning "UPDATE" here instead of "INSERT"
> because I see no way to know which operation took place.

That seems a bit short-sighted.  What should happen if one row was added
and one updated?

FWIW, I would've expected to be able to do  RETURNING excluded.foo
which would have been NULL in case of INSERT, and the value from the
updated tuple otherwise.  But that doesn't seem to work.


.m

В списке pgsql-bugs по дате отправления:

Предыдущее
От: rwestlun@gmail.com
Дата:
Сообщение: BUG #13886: When INSERT ON CONFLICT DO UPDATE updates, it returns INSERT rather than UPDATE
Следующее
От: Dmitriy Sarafannikov
Дата:
Сообщение: Re[2]: [BUGS] Re[2]: [BUGS] Wal sender segfault