From: Josh Berkus <josh@agliodbs.com>
To: Andreas Pflug <Andreas.Pflug@web.de>
To: pgsql-sql@postgresql.org
Subject: Re: How to notice column changes in trigger
Date: Fri, 7 Mar 2003 09:41:41 -0800
Message-ID: <200303070941.41276.josh@agliodbs.com> (raw)
In-Reply-To: <3E6874CD.4090501@web.de>
References: <3E6874CD.4090501@web.de>
Andreas,
> 1) update test set a=0 -> trigger does its work
> 2) update test set a=0, b=1, c=2 -> trigger does nothing
> 3) update test set a=0, b=b, c=c -> trigger does nothing, but content of
> a and b dont change either although touched
> IF OLD.b=NEW.b will not work, case 3) will falsely execute the trigger
> code.
I still don't get why you'd want to do this. Can you provide are real-world
example where there is a difference between setting B=B and not updating B?
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, Andreas.Pflug@web.de
Subject: Re: How to notice column changes in trigger
In-Reply-To: <200303070941.41276.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox