Re: allowing multiple PQclear() calls

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: allowing multiple PQclear() calls
Дата
Msg-id CACMqXCJVVJ_6WsOM-mo5h4tL=wYiv-qKz0k_0O+SuFhLsbp-qQ@mail.gmail.com
обсуждение исходный текст
Ответ на allowing multiple PQclear() calls  (Josh Kupershmidt <schmiddy@gmail.com>)
Ответы Re: allowing multiple PQclear() calls
Список pgsql-hackers
On Tue, Dec 11, 2012 at 6:59 AM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
> Would it be crazy to add an "already_freed" flag to the pg_result
> struct which PQclear() would set, or some equivalent safety mechanism,
> to avoid this hassle for users?

Such mechanism already exist - you just need to set
your PGresult pointer to NULL after each PQclear().

Later you can safely call PQclear() again on that pointer.

-- 
marko



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

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: Re: too much pgbench init output
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Proposal for Allow postgresql.conf values to be changed via SQL