"Fernando Hevia" <fhevia@ip-tel.com.ar> writes:
> Anyway, the rule didn't work. Got "an infinite recursion error" when
> inserting on the table.
> Can't figure out where the recursion is
You didn't show us the rule, but I imagine that you think the WHERE
clause is applied while expanding the rule. It's not, it can only
suppress rows at run-time; and what you've got is infinite macro
expansion recursion.
regards, tom lane