Re: [INTERFACES] ECPG: FETCH ALL|n FROM cursor - Memory allocation?
Michael Meskes <meskes@postgresql.org>
From: Michael Meskes <meskes@postgresql.org>
To: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2002-05-06T11:00:51Z
Lists: pgsql-hackers
On Mon, May 06, 2002 at 11:24:36AM +0100, Lee Kindness wrote: > If I allocate the memory before the FETCH then I (naturally) free > it. However If I NULL initialise the pointer then libecpg will > allocate the memory and I must NOT free it - libecpg will free it > automatically... Yeah? No. No matter who allocates the memory. You have to free it yourself. Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!