Re: PQexec(), what should I do for the "NULL in command" problem?

Поиск
Список
Период
Сортировка
Искать
От
Martijn van Oosterhout
Тема
Re: PQexec(), what should I do for the "NULL in command" problem?
Дата
Msg-id
20071112151338.GB13476@svana.org
Ответ на
Список
Дерево обсуждения
PQexec(), what should I do for the "NULL in command" problem? jason <zhyuyang@gmail.com>
Re: PQexec(), what should I do for the "NULL in command" problem? Martijn van Oosterhout <kleptog@svana.org>
Re: PQexec(), what should I do for the "NULL in command" problem? "yang zhenyu" <zhyuyang@gmail.com>
Re: PQexec(), what should I do for the "NULL in command" problem? Martijn van Oosterhout <kleptog@svana.org>
Re: PQexec(), what should I do for the "NULL in command" problem? "yang zhenyu" <zhyuyang@gmail.com>
On Thu, Nov 08, 2007 at 06:39:23PM -0800, jason wrote:
> As you know the interface of PQexec():
> PGresult *PQexec(PGconn *conn, const char *command);
> 
> "command" contains  some SQL statements.
> 
> But there exist "\0" in some data filed, and I found PQexec() failed
> on such situation.

Two ways:
- out of line parameters
- escape the nulls, like \0

Have a nice day,
-- 
Martijn van Oosterhout      http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy
В списке pgsql-general по дате отправления
От: Edoardo Panfili
Дата:
Сообщение: Re: float to int
От: Scott Marlowe
Дата:
FAQ