Re: possible memory leak with SRFs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: possible memory leak with SRFs
Date: 2010-05-07 15:09:04
Message-ID: 13112.1273244944@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com> writes:
>> Consider
>> srf(foo(col))
>> where foo returns a pass-by-reference datatype.

> Yeah this is my basic confusion. But wouldn't the arguments be
> evaluated afresh on the subsequent call for this SRF?

No, see ExecMakeFunctionResult(). If we did that we'd have serious
problems with volatile functions, ie srf(random()).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-05-07 15:31:40 Re: beta to release
Previous Message Kevin Grittner 2010-05-07 14:48:53 Re: no universally correct setting for fsync