Re: fire trigger for a row without update?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Jasen Betts" <jasen(at)xnet(dot)co(dot)nz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: fire trigger for a row without update?
Date: 2009-01-15 12:52:33
Message-ID: b42b73150901150452s2c1de0f9r1e93bcc275a8f372@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Jan 15, 2009 at 5:14 AM, Jasen Betts <jasen(at)xnet(dot)co(dot)nz> wrote:
> On 2009-01-14, Gerhard Heift <ml-postgresql-20081012-3518(at)gheift(dot)de> wrote:
>> Hello,
>>
>> is it possible to call a trigger for a row in a table without updating the
>> row? I want to do it in plpgsql.
>
>> Something like UPDATE table WHERE id = 10;
>
> when faced with that problem I do this:
>
> UPDATE table SET id=id WHERE id = 10;

One small point. 'id' is probably indexed....to get better advantage
of 'HOT', try updating a field that is not indexed instead.

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-01-15 12:59:18 Re: Polymorphic "setof record" function?
Previous Message Sam Mason 2009-01-15 11:46:46 Re: Select CASE when null ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-01-15 13:06:59 Re: fire trigger for a row without update?
Previous Message Heikki Linnakangas 2009-01-15 12:09:57 Re: BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION