Re: Iterating through individual fields of OLD/NEW records in plpgsql trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: j(dot)sachanbinski(at)coroplast(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Iterating through individual fields of OLD/NEW records in plpgsql trigger
Date: 2003-05-25 03:43:20
Message-ID: 3086.1053834200@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

j(dot)sachanbinski(at)coroplast(dot)de writes:
> is there a way to loop/iterate through every individual field of the
> OLD/NEW records in plpgsql trigger function?

No, plpgsql isn't designed to treat field names as data. You could do
it in pltcl though. Maybe plpython too; I'm not familiar with that.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-05-25 04:18:25 Re: disk space usage enlarging despite vacuuming
Previous Message Tom Lane 2003-05-25 03:41:49 Re: Trigger in transaction