Re: allowing multiple PQclear() calls

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: allowing multiple PQclear() calls
Дата
Msg-id CA+mi_8YzRSoZr4d+eFRGGH+WSjj+KU6-stqyckrBEOf-yw+MpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: allowing multiple PQclear() calls  (Josh Kupershmidt <schmiddy@gmail.com>)
Список pgsql-hackers
On Tue, Dec 11, 2012 at 12:43 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:

> Ah, well. I guess using a macro like:
>
> #define SafeClear(res) do {PQclear(res); res = NULL;} while (0);
>
> will suffice for me.

Psycopg uses:

#define IFCLEARPGRES(pgres)  if (pgres) {PQclear(pgres); pgres = NULL;}

-- Daniele



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: enhanced error fields
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [PATCH 02/14] Add support for a generic wal reading facility dubbed XLogReader