On Thu, Dec 29, 2005 at 11:44:26AM -0600, Jeff Amiel wrote:
> >Using triggers, is there a way to loop through the fields of the OLD 
> >and NEW records? I haven't found a generic way to get the field name 
> >and value that triggered the update other than hard coding if 
> >statements to compare every field of the OLD and NEW records.
> 
> We (my company) never found a way.  We ended up writing java code that 
> analyzed the catalog tables that generated the appropriate 'if' 
> statements in the trigger functions  for us....

As far as I know you can't do this yet in PL/pgSQL, but you can in
other languages like PL/Perl and PL/Tcl.

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to