Re: Error in recent pg_dump change (coverity)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error in recent pg_dump change (coverity)
Дата
Msg-id 17874.1148833150@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error in recent pg_dump change (coverity)  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Error in recent pg_dump change (coverity)  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> 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.

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

Hm.  But I think we'd *like* it to segfault; the idea is to make the
user's programming error as obvious as possible.  Is it worth the
trouble to just zero out the pointer members of the PGresult?
        regards, tom lane


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

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