Re: How to avoid UPDATE on same data in table ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Condor <condor(at)stz-bg(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to avoid UPDATE on same data in table ?
Date: 2020-02-02 17:18:07
Message-ID: 2955.1580663887@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Condor <condor(at)stz-bg(dot)com> writes:
> I'm using PostgreSQL 12.1 and trying to avoid update on table when data
> is the same. I read somewhere if UPDATE is with the same data SQL server
> on system level does not do update on table but don't know if that is
> true or not.

It is not, at least not for PG (can't say about SQL Server). But see
suppress_redundant_updates_trigger here:

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

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2020-02-02 19:17:28 Re: How to avoid UPDATE on same data in table ?
Previous Message Andreas Kretschmer 2020-02-02 14:43:27 Re: How to avoid UPDATE on same data in table ?