Re: [GENERAL] Lifetime of PQexecPrepared() returned value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Lifetime of PQexecPrepared() returned value
Дата
Msg-id 6665.1501957803@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Lifetime of PQexecPrepared() returned value  (Igor Korot <ikorot01@gmail.com>)
Список pgsql-general
Igor Korot <ikorot01@gmail.com> writes:
> However it leads to another question - should PQclear set the pointer to NULL?

C doesn't provide any reasonable way to do that.  The argument of PQclear
needn't even be an lvalue; for example, if you're not too concerned about
error checking, it's not unreasonable to write

    PQclear(PQexec(conn, "some SQL command"));

            regards, tom lane


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

Предыдущее
От: Igor Korot
Дата:
Сообщение: Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n
Следующее
От: "Dan Cooperstock at Software4Nonprofits"
Дата:
Сообщение: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)