Iterate OLD/NEW columns in a trigger?

From: "Steve - DND" <postgres(at)digitalnothing(dot)com>
To: "postgres-general" <pgsql-general(at)postgresql(dot)org>
Subject: Iterate OLD/NEW columns in a trigger?
Date: 2005-04-07 19:35:46
Message-ID: LDEHKBBOEMIJKHKBOFNFEEDLMIAA.postgres@digitalnothing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to iterate the columns contained on the OLD/NEW. I want to do
some work in a function in a trigger, but I want it to be generic. I don't
want to have to create a separate trigger for each table, since the work
performed in the trigger is essentially the same for all of them. I just
need to be able to dynamically find the columns associated with OLD/NEW to
make it work. I didn't see anything in the docs about this, anyone have a
solution?

Thanks,
Steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-04-07 19:44:21 Re: Iterate OLD/NEW columns in a trigger?
Previous Message Tom Lane 2005-04-07 18:48:06 Re: seg fault with tsearch2