From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Infinite recursion detected... How do I prevent that? |
Date: | 2005-01-19 14:47:50 |
Message-ID: | 41EE7316.9050602@magproductions.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Clive Page | 2005-01-19 14:50:22 | Re: Postgres crashed when adding a sequence column |
Previous Message | Martijn van Oosterhout | 2005-01-19 14:46:45 | Re: Best Linux Distribution |