Re: Re: how to implement add using upsert and trigger?

Поиск
Список
Период
Сортировка
От yin.zhb@163.com
Тема Re: Re: how to implement add using upsert and trigger?
Дата
Msg-id 202211282057577060707@163.com
обсуждение исходный текст
Ответ на how to implement add using upsert and trigger?  ("yin.zhb@163.com" <yin.zhb@163.com>)
Список pgsql-general
em, which is does not matter

yin.zhb@163.com
 
Date: 2022-11-28 20:47
Subject: Re: how to implement add using upsert and trigger?
On Mon, Nov 28, 2022 at 1:37 PM yin.zhb@163.com <yin.zhb@163.com> wrote:
>     on conflict(itemid) do update
>     set value = excluded.value + new.value, cnt = excluded.cnt +1 where excluded.itemid = new.itemid;
 
OT, but isn't `where excluded.itemid = new.itemid` redundant, given
`on conflict(itemid)`?
I'm asking more because I'm not sure, for my own education. Thanks, --DD
 

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

Предыдущее
От: Dominique Devienne
Дата:
Сообщение: Re: how to implement add using upsert and trigger?
Следующее
От: Anna B.
Дата:
Сообщение: Re[2]: Index-only scan not working when IN clause has 2 or more values