Re: [HACKERS] Uncleared result sets in describeOneTableDetails()

2006-11-07 Thread Neil Conway
On Tue, 2006-11-07 at 17:56 +1100, Brendan Jurd wrote: > Should be just six extra lines (patch attached, untested). Applied to HEAD, with an additional fix: you need to clear "result5" as well. I didn't bother applying it to backbranches, on the grounds that a memory leak in psql is not serious.

Re: [HACKERS] Uncleared result sets in describeOneTableDetails()

2006-11-07 Thread Neil Conway
On Tue, 2006-11-07 at 17:56 +1100, Brendan Jurd wrote: > It certainly isn't pretty. It's been a long time since I looked down > the barrel of a 'goto'. I don't think there's anything wrong with using "goto" for error handling in this style. Personally, I think the main stylistic problem is that t

Re: [HACKERS] Uncleared result sets in describeOneTableDetails()

2006-11-06 Thread Brendan Jurd
On 11/7/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Brendan Jurd" <[EMAIL PROTECTED]> writes: > Is it crucial that result sets be cleared before going out of scope? It sounds like it'd leak memory inside psql; but realistically that's probably not an enormous problem for this usage. How much uglif

Re: [HACKERS] Uncleared result sets in describeOneTableDetails()

2006-11-06 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > Is it crucial that result sets be cleared before going out of scope? It sounds like it'd leak memory inside psql; but realistically that's probably not an enormous problem for this usage. How much uglification of the code are we talking about to fix it