Belinda Cussen <belinda(dot)cussen(at)servian(dot)com(dot)au> writes:
> The code works ok on my database too when I call the procedure only once
> sequentially. I hit the segmentation fault consistently when I try to call
> the proc concurrently.
What do you mean by "concurrently"? There is no multithreading within
Postgres backends, and it's really hard to believe that unnest would be
affected by what's happening in other server processes.
regards, tom lane