Re: Terminating a SETOF function call sequence

From: "John Hansen" <john(at)geeknet(dot)com(dot)au>
To: "Thomas Hallgren" <thhal(at)mailblocks(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Terminating a SETOF function call sequence
Date: 2005-02-17 09:40:07
Message-ID: 5066E5A966339E42AA04BA10BA706AE56250@rodrick.geeknet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> ... c) would be very bad since it
> doesn't give me any chance to release the resources that
> where used in order to produce the rows.

You are supposed to free resources used to produce the rows before srf_return_next();
The actual rows are pfree()'d by pg. (an dso are any other palloc()'d resources, but I'd recommend freeing them anyway, especially if youre going to use the function in an index or transactions, since resources a not freed till the end of the transaction)

... JOhn

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-02-17 10:01:56 Re: win32 performance - fsync question
Previous Message Christopher Kings-Lynne 2005-02-17 09:15:58 Re: Strange RETURN NEXT behaviour in Postgres 8.0