Re: update with no changes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: update with no changes
Дата
Msg-id 3085805.1637342549@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: update with no changes  (Marcos Pegoraro <marcos@f10.com.br>)
Список pgsql-hackers
Marcos Pegoraro <marcos@f10.com.br> writes:
> But it takes resources for other operations, right ?
> I think this is not unusual. If an user double click on a grid, just sees a
> record and clicks ok to save, probably that application calls an update
> instead of seeing if some field were changed before that.

[ shrug... ]  As David said, if you think that it's important to have
such a check in a particular application, use a trigger to check it.
There's one built-in, you don't even need an extension:

https://www.postgresql.org/docs/current/functions-trigger.html

We're not going to make that happen by default though, because it'd
be a net drag on better-written applications.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: update with no changes
Следующее
От: wenjing
Дата:
Сообщение: Re: [Proposal] Global temporary tables