update with no changes

Поиск
Список
Период
Сортировка
От Marcos Pegoraro
Тема update with no changes
Дата
Msg-id CAB-JLwbvubZ17JEiHUrzyq=RvSYZ4cFeNtHkCM8ZDCCfuc328g@mail.gmail.com
обсуждение исходный текст
Ответы Re: update with no changes  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: update with no changes  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Why this happens ?

create table t(i int);
CREATE TABLE
insert into t values(1);
INSERT 0 1
select (ctid::text::point)[1]::int, * from t;
 ctid | i
------+---
    1 | 1
(1 row)
update t set i = i;
UPDATE 1
select (ctid::text::point)[1]::int, * from t;
 ctid | i
------+---
    2 | 1
(1 row)

If nothing was changed, why create a new record, append data to wal, set old record as deleted, etc, etc ?

regards,
Marcos

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: A spot of redundant initialization of brin memtuple
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?