Re: Error in recent pg_dump change (coverity)

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Error in recent pg_dump change (coverity)
Дата
Msg-id 20060528161334.GC22869@svana.org
обсуждение исходный текст
Ответ на Re: Error in recent pg_dump change (coverity)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Error in recent pg_dump change (coverity)
Список pgsql-hackers
On Sun, May 28, 2006 at 12:00:33PM -0400, Tom Lane wrote:
> Another possibility is to just MemSet the whole PGresult struct
> to zeroes before free'ing it.  Compared to the cost of obtaining
> a query result from the backend, this probably doesn't cost enough
> to be worth worrying about, and it would catch a few more problems
> of the same ilk.

Probably better actually, since by setting ntups to zero also,
PQgetvalue will return a warning (row number out of range) rather than
segfaulting...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Error in recent pg_dump change (coverity)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error in recent pg_dump change (coverity)