Do I understand correctly that it's impossible to have a rule on insert that does an insert to the same table as no matter the condition it will still trigger itself before the condition is checked thus giving the infinite recursion error?
I'm not 100% certain but as far as I know, yes it's not possible. The purpose of rules is to rewrite queries, sort of a macro system: "you write X and I write y". If the source and the target are the same, the rule itself gets re-activated.
A trigger instead is a precondition (or post condition) to a query.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks a ton!
Do I understand correctly that it's impossible to have a rule on insert that does an insert to the same table as no matter the condition it will still trigger itself before the condition is checked thus giving the infinite recursion error?
I'm not 100% certain but as far as I know, yes it's not possible. The purpose of rules is to rewrite queries, sort of a macro system: "you write X and I write y". If the source and the target are the same, the rule itself gets re-activated.
A trigger instead is a precondition (or post condition) to a query.