Re: Trigger and arguments question

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Trigger and arguments question
Дата
Msg-id 20050527065453.Y80232@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Trigger and arguments question  (Hervé Inisan <typo3@self-access.com>)
Список pgsql-general
On Thu, 26 May 2005, [iso-8859-1] Herv� Inisan wrote:

> It sends an argument to myfunction(), and I can retrieve this value in
> TG_ARGV[0]. Fine.
> What I'm trying to do is using TG_ARGV[0] to point to a field in NEW or OLD.
> Is it possible?
>
> Something like NEW.TG_ARGV[0]...
>
> I'm trying to write a kind of generic function which I could use on multiple
> tables with different field names (myarg being the field name).
> But I can't get it to work.
>
> Any clues or other solutions?

If you're using plpgsql, that's not possible.  It should be possible in
some of the other pl languges, however.

В списке pgsql-general по дате отправления:

Предыдущее
От: "David Parker"
Дата:
Сообщение: Re: another failover testing question
Следующее
От: Jeff Trout
Дата:
Сообщение: Re: Just a crazy idea!