Re: Column level triggers - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Column level triggers
Date
Msg-id dcc563d10810141716x67e30aacu56ad1c5f03db2e6c@mail.gmail.com
Whole thread Raw
In response to Column level triggers  ("Laurent Wandrebeck" <l.wandrebeck@gmail.com>)
Responses Re: Column level triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Column level triggers  (Peter Eisentraut <peter_e@gmx.net>)
Re: Column level triggers  ("Laurent Wandrebeck" <l.wandrebeck@gmail.com>)
List pgsql-general
On Mon, Oct 13, 2008 at 3:44 AM, Laurent Wandrebeck
<l.wandrebeck@gmail.com> wrote:
> Hi,
>
> According to the documentation (
> http://www.postgresql.org/docs/8.3/interactive/sql-createtrigger.html
> ), the feaure "SQL allows triggers to fire on updates to specific
> columns (e.g., AFTER UPDATE OF col1, col2)" is missing.
> After a bit of research, I found that this feature was in the TODO
> list ( http://wiki.postgresql.org/wiki/Todo#Triggers ), and that a
> patch was proposed on 2005/07.
> Is it going to be implemented soon ? It would greatly help, IMHO, for
> load, and simplify the write of plpgsql functions called by before
> triggers.
> Regards, and keep up the good work, that DBMS (mostly;) rocks !

You'll probably have to ask that in -hackers.  I'm guessing it's one
of those things that if one wrote a sufficiently large check one could
find a hacker to implement it.  But I can't imagine it being a weekend
project, and if it's not already in 8.4 beta it wouldn't make it to
8.4, but you'd have to shoot for 8.5.

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.

pgsql-general by date:

Previous
From: Chris
Date:
Subject: Re: Drupal and PostgreSQL - performance issues?
Next
From: "Scott Marlowe"
Date:
Subject: Re: Drupal and PostgreSQL - performance issues?