Re: The suppress_redundant_updates_trigger() works incorrectly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: The suppress_redundant_updates_trigger() works incorrectly
Date: 2008-11-05 18:50:20
Message-ID: 1119.1225911020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> OK, that will be easy enough. I assume I should still put InvalidOid
>> back again afterwards, in case someone downstream relies on it.

> Can't imagine what ...

Actually ... what *could* change in the future is that we might support
UPDATE'ing the OID to a different value. So what the code probably
needs to do is something like

if (relation->rd_rel->relhasoids &&
!OidIsValid(HeapTupleGetOid(newtup)))
HeapTupleSetOid(newtup, HeapTupleGetOid(oldtup));

(details stolen from heap_update)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-11-05 18:50:33 Re: The suppress_redundant_updates_trigger() works incorrectly
Previous Message Tom Lane 2008-11-05 18:41:44 Re: The suppress_redundant_updates_trigger() works incorrectly