From: | Andrew Chernow <ac(at)esilo(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Merlin Moncure <mmoncure(at)gmail(dot)com> |
Subject: | Re: [PATCHES] libpq events patch (with sgml docs) |
Date: | 2008-09-05 20:08:07 |
Message-ID: | 48C191A7.3000205@esilo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Alvaro Herrera wrote:
> Andrew Chernow escribió:
>
>> * and the Perl5 interface, so maybe it's not so unreasonable.
>> + *
>> + * Updated April 2008 - If conn is not NULL, event states will be copied
>> + * from the PGconn to the created PGresult.
>> */
>
> Don't do this either. We don't really need to know when the thing was
>
Changed that and made it one paragraph.
>> + /* resultalloc the attribute names. The above memcpy has the attr
>> + * names pointing at the callers provided attDescs memory.
>> + */
>
> "resultalloc"? Why not just "allocate"?
>
Because resultalloc is what a PGresult uses to allocate its attribute
names (See line 513 of fe-protocol3.c). Also, PQclear frees its memory
blocks, not individual items like attname.
>> * PQclear -
>> * free's the memory associated with a PGresult
>> */
>
> I'd add a comment here stating why the event name is not deallocated;
> otherwise it just looks like it's being leaked.
>
>
The event name is being deallocated.
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
Attachment | Content-Type | Size |
---|---|---|
libpq-events.patch | text/plain | 51.1 KB |
libpq-events.tgz | application/x-compressed | 13.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2008-09-05 20:13:58 | Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker) |
Previous Message | Martin Pihlak | 2008-09-05 19:51:36 | Re: reducing statistics write overhead |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2008-09-05 20:13:58 | Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker) |
Previous Message | Alvaro Herrera | 2008-09-05 19:48:53 | Re: [PATCHES] libpq events patch (with sgml docs) |