From: | Matteo Beccati <php(at)beccati(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Allow substitute allocators for PGresult. |
Date: | 2011-11-12 20:38:55 |
Message-ID: | 4EBED95F.3010901@beccati.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/11/2011 07:36, Robert Haas wrote:
> On Sat, Nov 12, 2011 at 12:48 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> AIUI Kyotaro-san is just suggesting that the app should be able to
>> provide a substitute malloc function for use in allocating PGresult
>> space (and not, I think, anything else that libpq allocates internally).
>> Basically this would allow PGresults to be cleaned up with methods other
>> than calling PQclear on each one. It wouldn't affect how you'd interact
>> with one while you had it. That seems like pretty much exactly what we
>> want for preventing memory leaks in the backend; but is it going to be
>> useful for other apps?
>
> I think it will.
Maybe I've just talking nonsense, I just have little experience hacking
the pgsql and pdo-pgsql exstensions, but to me it would seem something
that could easily avoid an extra duplication of the data returned by
pqgetvalue. To me it seems a pretty nice win.
Cheers
--
Matteo Beccati
Development & Consulting - http://www.beccati.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2011-11-12 22:02:23 | Re: Allow substitute allocators for PGresult. |
Previous Message | Kohei KaiGai | 2011-11-12 20:28:53 | Re: [v9.2] Object access hooks with arguments support (v1) |