"Jeff Barrett" <jbarrett@familynetwork.com> writes:
> I have a function that takes a comma seperated string from another table and
> parses it into another table. When I run it on a string with 130 ids it
> works fine, when I run it on a string with 50,000 ids (each about 6
> characters long) I get the Error: Memory exhausted in AllocSetAlloc(269039).
Seems to run fine in 7.2beta. Prior versions of plpgsql tended to leak
memory within a function call, but that's been worked on in 7.2.
If you don't care to run beta code, you could possibly work around the
problem in 7.1 by subdividing your function. Look in the archives for
a prior discussion of this issue (last summer, I think).
regards, tom lane