Re: [GENERAL] A possible use case for: "INSERT .. ON CONFLICT DO SELECT [FOR ..]"

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: [GENERAL] A possible use case for: "INSERT .. ON CONFLICT DO SELECT [FOR ..]"
Дата
Msg-id CAL9smLDAwsVyG2bNY7JeD9nGp0bFP5ZbGU0O+oviP==W_SWVjA@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
On Sat, Nov 4, 2017 at 6:41 PM, Marc-Olaf Jaschke <moj@dshare.de> wrote:
Perhaps I misunderstand the discussion but would "INSERT .. ON CONFLICT DO SELECT [FOR ..]" not provide a solution for the following use case?

[ .. ]

That works. But it is a bit inconvenient to write the pseudo update clause.

Right.  This is exactly the use case for  ON CONFLICT DO SELECT.  The "no-op" UPDATE bloats the table unnecessary and just generally results in unnecessary overhead.


.m

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

Предыдущее
От: Neto pr
Дата:
Сообщение: [GENERAL] Runtime analysis
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Runtime analysis