Re: Uncleared result sets in describeOneTableDetails()
От
Brendan Jurd
Тема
Re: Uncleared result sets in describeOneTableDetails()
Дата
Msg-id
37ed240d0611062256t2f3e6d8aka79fd9b0e05b6cde@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Uncleared result sets in describeOneTableDetails() "Brendan Jurd" <direvus@gmail.com>
Re: Uncleared result sets in describeOneTableDetails() Tom Lane <tgl@sss.pgh.pa.us>
Re: Uncleared result sets in describeOneTableDetails() "Brendan Jurd" <direvus@gmail.com>
Re: Uncleared result sets in describeOneTableDetails() Neil Conway <neilc@samurai.com>
Re: Uncleared result sets in describeOneTableDetails() Neil Conway <neilc@samurai.com>
On 11/7/06, Tom Lane wrote: > "Brendan Jurd" 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? > Should be just six extra lines (patch attached, untested). This isn't really an uglification of the code, so much as bringing this particular code segment into line with the existing ugliness standard of the rest of the function. =) It certainly isn't pretty. It's been a long time since I looked down the barrel of a 'goto'. This sort of thing feels like it should be dealt with by RAII or try/catch, but this is C we're talking about. It's hard to do things gracefully. Regards, BJ
В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата: