Re: Examing cotets of NEW & OLD in a function programed in perl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: stan <stanb(at)panix(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Examing cotets of NEW & OLD in a function programed in perl
Date: 2020-03-03 17:59:00
Message-ID: 6106.1583258340@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

stan <stanb(at)panix(dot)com> writes:
> I need to write a generic function to process data before allowing the
> insert or update to continue.
> To do this, I need to be able to examine the NEW, and OLD structures
> without prior knowledge of the structure of the table that fired the
> trigger.

AFAIR, they're just hashes in Perl, so you should be able to do
stuff like iterating over the hash keys.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-03-03 18:48:29 Re: Detecting which columns a query will modify in a function called by a trigger
Previous Message stan 2020-03-03 17:42:48 Re: Detecting which columns a query will modify in a function called by a trigger