Re: minimal update

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: minimal update
Date: 2007-11-02 17:14:02
Message-ID: 472B5ADA.7050203@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
>
>> On Fri, Nov 02, 2007 at 11:49:38AM -0400, Andrew Dunstan wrote:
>>
>>> At the moment I have to write things like:
>>>
>>> update tname set foo = bar ... where foo is null or foo <> bar
>>>
>
>
>> One way I've done this is make RULEs which basically drop non-updating
>> "UPDATEs" on the floor.
>>
>
> A BEFORE UPDATE trigger would be better, and probably hardly more
> expensive than a wired-in facility (especially if you were willing to
> write it in C).
>
>
>

Yes. I also prefer the trigger idea to a rule because triggers are easy
to enable and disable. It's still a lot of work for what must be a
common want, though. Could it be done generically?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-11-02 17:20:41 Re: Clarification about HOT
Previous Message Heikki Linnakangas 2007-11-02 17:07:10 Re: Clarification about HOT