Alvaro Herrera wrote:
why is this a malloc() and not palloc()? And when/where/how is it freed?

It isn't, at least not until the backend exits ;-)

This is how plpgsql is done throughout, pretty much. It's not so bad when you remember that plpgsql functions are "compiled" once, and then cached for future calls by the same backend.

Having said that, however, I know Tom would like to see all of this redone in the future, with palloc, and maybe a specific memory context to ensure we don't leak memory when we don't want to.


---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Reply via email to