Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

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.
Something like this:

PQexec(conn, "INSERT INTO tttt('ttttt', 'abc\0abc');


Does anyone know something about this?
How can I insert a record which has some NULLs in data filed?


Best Regards,
Jason


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux