Re: Update on tables when the row doesn't change

Поиск
Список
Период
Сортировка
От Tim Vadnais
Тема Re: Update on tables when the row doesn't change
Дата
Msg-id 20050525154129.52D115284B@svr1.postgresql.org
обсуждение исходный текст
Ответ на Update on tables when the row doesn't change  (Sebastian Böck <sebastianboeck@freenet.de>)
Ответы Re: Update on tables when the row doesn't change  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: Update on tables when the row doesn't change  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Hi All,

Can someone please address this aspect of Sebastian's email?  I, too, am
interested in the response.

>> Why does Postgres perform an update on the table even
>> if no data changes?
>> Can I circumvent this behaviour of Postgres?

Tim

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Sebastian Böck
Sent: Tuesday, May 24, 2005 8:06 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Update on tables when the row doesn't change

Hi all,

Maybe it's a very silly question, but why does Postgres perform an update on
the table even if no data changes?

I recognized this recently doing a rewrite of my rules because they took to
long. I had many conditional rules I collapsed to one unconditional rule, so
that the views get constructed only once. If I split these updates to the
underlying tables, I get a lot of updates which don't perform any "real"
updates.

Can I circumvent this behaviour of Postgres only by defining lot of rules /
triggers on these underlying table are there some trickier ways?

Any help appreciated,

Sebastian

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly



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

Предыдущее
От: "Eric Jones"
Дата:
Сообщение: triggers/functions across databases
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: triggers/functions across databases