I have a plpgsql function that serves as a change log for a few tables
in my db (8.4.2). In most of the tables that I am logging, there is an
"editor" column that stores the ID of the user who made the change, so
as part of the function I set
editor := NEW.editor;
There are a few of the tables that don't store editor, in which case I
am ok with inserting it into the log as NULL. The problem is I can't
seem to come up with a conditional to see if NEW has a column named
"editor".
Any help is greatly appreciated.
Thanks.
Mike Ginsburg