Tilo Schwarz <mail@tilo-schwarz.de> writes:
> I have a problem (7.3.1 on linux) with a query eating all my memory.
> http://www.tilo-schwarz.de/OutOfMem.txt
You didn't tell us much about the functions involved in these views,
but I suspect the problem has to do with the fact that you're passing
whole-row references (foo.*) to the functions. The mechanism for
handling whole-row references is horrid --- it leaks memory that isn't
reclaimed till end of query. We need to redesign it someday. In the
meantime, try passing just the columns you need, explicitly.
regards, tom lane