Re: (trigger function) -> ERROR: NEW used in non-rule query

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: (trigger function) -> ERROR: NEW used in non-rule query
Дата
Msg-id 200307181003.42279.dev@archonet.com
обсуждение исходный текст
Ответ на (trigger function) -> ERROR: NEW used in non-rule query  (Terence Kearns <terencek@isd.canberra.edu.au>)
Ответы Re: (trigger function) -> ERROR: NEW used in non-rule query  (Terence Kearns <terencek@isd.canberra.edu.au>)
Список pgsql-sql
On Friday 18 Jul 2003 9:22 am, Terence Kearns wrote:
> I'm writing a trigger which wants to reference the pre-defined NEW record.
>
> I can do this
> idval := NEW.blah;
>
> This works fine!!!
>
> What I really need to do is
> idval := NEW.(quote_ident(TG_ARGV[3]));
> or this
> idval := NEW.(TG_ARGV[3]);

I'll give you the short answer - no you can't do this (in plpgsql). Which
isn't to say it'll never be possible, but not at the moment.

Can you afford to look at an alternative language? I'd suggest looking at TCL,
although I must admit I've never used it myself.


--  Richard Huxton


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

Предыдущее
От: Terence Kearns
Дата:
Сообщение: (trigger function) -> ERROR: NEW used in non-rule query
Следующее
От: Terence Kearns
Дата:
Сообщение: Re: (trigger function) -> ERROR: NEW used in non-rule query