066ce286@free.fr writes:
> What is confusing, is that if I do the same with a pl/pgsql function (see below) I can run it 5 times, and the 6th
exechit the same SEGV...
That probably reflects switching from a custom plan to a generic plan
on the sixth execution.
regards, tom lane