Re: [GENERAL] Column level triggers

2008-10-15 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > 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 co

Re: [GENERAL] Column level triggers

2008-10-15 Thread Robert Treat
On Wednesday 15 October 2008 04:19:59 Laurent Wandrebeck wrote: > 2008/10/15 Scott Marlowe <[EMAIL PROTECTED]>: > > 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

Re: [GENERAL] Column level triggers

2008-10-15 Thread Laurent Wandrebeck
2008/10/15 Scott Marlowe <[EMAIL PROTECTED]>: > > 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

Re: [GENERAL] Column level triggers

2008-10-15 Thread Peter Eisentraut
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

Re: [GENERAL] Column level triggers

2008-10-14 Thread Scott Marlowe
On Tue, Oct 14, 2008 at 6:47 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Scott Marlowe" <[EMAIL PROTECTED]> writes: >> 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. > > ... which is p

Re: [GENERAL] Column level triggers

2008-10-14 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > 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. ... which is pretty much the same thing a built-in implementation would have to do, too. S

Re: [GENERAL] Column level triggers

2008-10-14 Thread Scott Marlowe
On Mon, Oct 13, 2008 at 3:44 AM, Laurent Wandrebeck <[EMAIL PROTECTED]> 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