Chapter 1. libpq - C Library
1.3. Command Execution Functions
1.3.3. Escaping binary strings for inclusion in SQL queries
I found the line
"The result string length does not include the terminating zero byte of the result."
is not right.
The result string length does indeed include the terminating zero byte.
Christoph Haller
characters in this binary string (a terminating zero byte is
neither necessary nor counted). The
to_length
parameter shall point to a buffer suitable to hold the resultant
- escaped string length. The result string length does not
- include the terminating zero byte of the result.
+ escaped string length. The result string length includes the terminating
+ zero byte of the result.