Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> niechciana rekurencja triggera
php programmer
post
Post #1





Grupa: Zarejestrowani
Postów: 1 045
Pomógł: 5
Dołączył: 8.11.2004
Skąd: trójmiasto

Ostrzeżenie: (0%)
-----


Witam,
mam dziwny problem z TRIGGEREM,
otóż dla pewnej tabeli założyłem triggera, na akcję AFTER UPDATE,
który wykonuje update na tej tabeli, co powoduje,
że w kółko wykonuje się ten TRIGGER,
czy da się to jakoś obejść? Pytanie retoryczne,
bo pewnie się da, tylko jak to zrobić?

Ten post edytował php programmer 12.10.2006, 08:17:19
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
dr_bonzo
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

Ostrzeżenie: (0%)
-----


Cytat
If a trigger function executes SQL commands then these commands may fire triggers again. This is known as cascading triggers. There is no direct limitation on the number of cascade levels. It is possible for cascades to cause a recursive invocation of the same trigger; for example, an INSERT trigger might execute a command that inserts an additional row into the same table, causing the INSERT trigger to be fired again.


http://www.postgresql.org/docs/8.1/static/triggers.html

Wydaje mi sie ze zle to zaplanowales. Moze opisz co chcesz zrobic tym triggerem po updacie rekordu. Updatujesz w nim ten sam rekord czy jakis inny?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.10.2025 - 04:11