On 11/17/2013 01:42 AM, Tom Lane wrote:
> Hannu Krosing <hannu@2ndQuadrant.com> writes:
>> I have not looked at the patch, but does it also run pre-rollback ?
> error in trigger -> instant infinite loop.
Means this needs to have some kind of recursion depth limit, like python
>>> def x():
... return x()
...
>>> x()
... (a few thousand messages like the following) ... File "<stdin>", line 2, in x
RuntimeError: maximum recursion depth exceeded
>
> Besides, exactly what would you do in such a trigger?
The use case would be telling another system about the rollback.
Basically sending a "ignore what I told you to do" message
So it would send a network message, a signal or writing something to
external file.
> Not modify
> the database, for certain, because we're about to roll back.
>
> regards, tom lane
Cheers
--
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ