Re: Referencing any field in a trigger

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Referencing any field in a trigger
Дата
Msg-id 20070525174520.GC15294@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Referencing any field in a trigger  (Robert Fitzpatrick <lists@webtent.net>)
Ответы Re: Referencing any field in a trigger  (Robert Fitzpatrick <lists@webtent.net>)
Список 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 по дате отправления:

Предыдущее
От: Robert Fitzpatrick
Дата:
Сообщение: Re: Referencing any field in a trigger
Следующее
От: "Arnaldo Gandol"
Дата:
Сообщение: 2 instance of postgres service running against same db files?