| From: | Larry Rosenman <ler(at)lerctr(dot)org> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | trigger question |
| Date: | 2002-05-16 17:38:13 |
| Message-ID: | 1021570694.95676.7.camel@ler-freebie.iadfw.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Is there a way in PL/pgSQL to have a trigger look at the fields in a
%ROWTYPE variable to look for changes?
I'm looking to be able to log the fields that are different between old
and new in a trigger, but don't want to have to list each field (It
changes, occasionally, but it changes). I'd also like to add a
timestamp and flag field when I store the record in the log table.
Am I just SOL, or is there a way to do this? (7.2.1, if it matters).
Thanks,
LER
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2002-05-16 17:49:23 | Re: trigger question |
| Previous Message | Josh Berkus | 2002-05-16 15:12:26 | Re: Rules and Triggers |