update in triggers

Поиск
Список
Период
Сортировка
От Jamie Deppeler
Тема update in triggers
Дата
Msg-id 41EDE601.6000006@doitonce.net.au
обсуждение исходный текст
Ответы Re: update in triggers  (Michael Fuhr <mike@fuhr.org>)
Re: update in triggers  ("Mike G." <mike@thegodshalls.com>)
Re: update in triggers  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
Hi,

Think im doing something wrong here, cant seem to resolve the problem i
have a trigger which is calling a update function and when it gets to a
update it goes into a infinite loop

code

Trigger
CREATE TRIGGER "new_trigger" AFTER INSERT OR UPDATE
ON "chargeratetest" FOR EACH ROW
EXECUTE PROCEDURE "chargeratetest"();


function

CREATE OR REPLACE FUNCTION "chargeratetest" () RETURNS trigger AS'
begin

  UPDATE chargeratetest
  set notes=''hello''
  where new."primary" = chargeratetest."primary";

  return null;
end;
'LANGUAGE 'plpgsql' IMMUTABLE CALLED ON NULL INPUT SECURITY INVOKER;


would be greatful for any help thx

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Is initdb needed from 8.0.0rc3 to 8.0.0?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: PL/PgSQL Index Usage with Trigger Variables