Re: Column level triggers

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Laurent Wandrebeck <l(dot)wandrebeck(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Column level triggers
Date: 2008-10-15 08:04:08
Message-ID: 48F5A3F8.4090508@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Scott Marlowe wrote:
> Since you can check which columns have changed, it's pretty easy to
> write a trigger that just skips its logic when none of the trigger
> columns have changed.

I think column-level triggers actually fire when one of the columns is
written to, not only when the value there is distinct from the previous
one. This small difference is not easy to emulate by comparing OLD and
NEW in the trigger body. Details might need to be checked in the
standard and existing implementations.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurent Wandrebeck 2008-10-15 08:19:59 Re: Column level triggers
Previous Message Greg Smith 2008-10-15 06:20:13 Re: Drupal and PostgreSQL - performance issues?

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2008-10-15 08:10:59 Re: Updates of SE-PostgreSQL 8.4devel patches
Previous Message Simon Riggs 2008-10-15 07:29:21 Re: CLUSTER, REINDEX, VACUUM in "read only" transaction?