Re: passing argument ro a trigger

Поиск
Список
Период
Сортировка
От Ivan il Terribile
Тема Re: passing argument ro a trigger
Дата
Msg-id 02022313511003.00473@master
обсуждение исходный текст
Ответ на passing argument ro a trigger  (darthxiong@libero.it)
Список pgsql-admin
Il Friday 22 February 2002 23:43, pur dolorante per l' artrite alle
dita, scrivesti....
> > CREATE TRIGGER trigger_align_status
> > AFTER INSERT ON table2
> > FOR EACH STATEMENT
> > EXECUTE PROCEDURE align_status ( UUUAAAAAAAARRGGHHH );
>
> Trys this:
>
> Execute Procedure align_status ((select max(major) from
> table1));
> ** note 2 parentesis...

the major modified is not necessarily the last.... but this is an idea!
the number of the major modified can be found looking at insert time :>
Execute Procedure align_status ((
   select major from table1 where major_time = max( major_time )
));
maior_time stores the time of insertion of the touple
thanks for the hint... this solves my problem! but the general idea was:
there is a way for the trigger activated in AFTER mode to know ( and
refer to, and use ) its activator touple ?
the smartest way could be
 CREATE TRIGGER trigger_align_status
 AFTER INSERT ON table2
 FOR EACH STATEMENT
 EXECUTE PROCEDURE align_status ( pointer_to_activator_touple.field );

TIA

--
   (@_  Ivan Fabris, S.Sofia (FC) Powered by Linux Debian Woody   _*)
   //\      www.darthxiong.net   setiathome.ssl.berkeley.edu      /\\
   V_/_     www.folug.linux.it   pgp key @ www.keyserver.net     _\_V


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

Предыдущее
От: "Gaetano Mendola"
Дата:
Сообщение: Re: plpgsql error
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: psql --single-step mode doesn't like empty sets