Re: Referencing any field in a trigger - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Referencing any field in a trigger
Date
Msg-id 20070525174520.GC15294@alvh.no-ip.org
Whole thread Raw
In response to Re: Referencing any field in a trigger  (Robert Fitzpatrick <lists@webtent.net>)
Responses Re: Referencing any field in a trigger
List pgsql-general
Robert Fitzpatrick wrote:

> But still, how would I reference all fields using the pl/perl? Can I
> specify column numbers versus names as in '$_TD->{new}{1}' for the first
> column and loop or something? For instance, I would like to be able to
> say if any NEW column has a single asterisk only, set it to '%%%'.

Well, do a foreach ($_TD->{new}) or foreach (keys $_TD->{new}) (not sure
of the exact syntax but if you're used to Perl you can figure it out).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: Robert Fitzpatrick
Date:
Subject: Re: Referencing any field in a trigger
Next
From: "Arnaldo Gandol"
Date:
Subject: 2 instance of postgres service running against same db files?