Search Postgresql Archives

Re: Infinite recursion detected... How do I prevent that?

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

 



Martijn van Oosterhout wrote:
Sorry, RULEs are like macros, they essentially expand and transform
your original query. This also means the expansion does not depend on
the data in your database. So postgresql continaually expands the
query, leading to your infinite recursion error.

I just found out. makes sense...

Why do you want a RULE anyway, trigger are much easier to understand.
It may be possile to setup some RULEs to avoid recursion but it won't
be easy...

Well, actually the easiest way to do this turns out to be defining my foreign key constraint with "on delete cascade". That does exactly what I intend to do, and at the right time too :)


Alban.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[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