Re: [rfc,patch] PL/Proxy in core - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [rfc,patch] PL/Proxy in core
Date
Msg-id e51f66da0805150833h43a5925cw4ec9b3665ae24b61@mail.gmail.com
Whole thread Raw
In response to Re: [rfc,patch] PL/Proxy in core  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [rfc,patch] PL/Proxy in core  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 5/15/08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Marko Kreen" <markokr@gmail.com> writes:
> > Eg. how does src/backend/parser/gram.c not leak memory on syntax error?
>
> It's not a leak because the memory can be re-used during the next
>  command.

I may be blind, but I don't see any static variables there.

>  I believe you'll find that trying to make it use palloc is a failure
>  because it keeps static pointers that it expects will stay valid across
>  calls.

Thats true, I need to drop the redefines if the allocations may be reused.

-- 
marko


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [rfc,patch] PL/Proxy in core
Next
From: Andrew Dunstan
Date:
Subject: Re: SSL and USER_CERT_FILE round 2