Search Postgresql Archives

Re: trigger self recursion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sim Zacks wrote:
Is there a way to avoid trigger self-recursion?
In other words, update a table and have the trigger update another row in
the same table without calling the same trigger?

No a per-row trigger will fire for every row updated.

There is presumably some test you can make to see whether your trigger should do any work, or just exit. I have seen people on the list who wrote the test in "C" and put the work in a separate function, but have never needed that level of complexity myself.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux