Re: Uncleared result sets in describeOneTableDetails()
| От | Brendan Jurd |
|---|---|
| Тема | Re: Uncleared result sets in describeOneTableDetails() |
| Дата | |
| Msg-id | 37ed240d0611062256t2f3e6d8aka79fd9b0e05b6cde@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Uncleared result sets in describeOneTableDetails() (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Uncleared result sets in describeOneTableDetails()
Re: Uncleared result sets in describeOneTableDetails() |
| Список | pgsql-hackers |
On 11/7/06, Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Brendan Jurd" <direvus@gmail.com> 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 по дате отправления: