1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Add libpq comment about how to determine the format used for passing

binary values.

Add comments to libpq C function for parameter passing.
This commit is contained in:
Bruce Momjian
2008-06-23 21:10:49 +00:00
parent 01930cea03
commit 2296e29998
2 changed files with 13 additions and 3 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.195 2008/05/29 22:02:44 tgl Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.196 2008/06/23 21:10:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -976,12 +976,13 @@ PQsendQueryGuts(PGconn *conn,
goto sendFailed;
}
/* construct the Bind message */
/* Construct the Bind message */
if (pqPutMsgStart('B', false, conn) < 0 ||
pqPuts("", conn) < 0 ||
pqPuts(stmtName, conn) < 0)
goto sendFailed;
/* Send parameter formats */
if (nParams > 0 && paramFormats)
{
if (pqPutInt(nParams, 2, conn) < 0)
@ -1001,6 +1002,7 @@ PQsendQueryGuts(PGconn *conn,
if (pqPutInt(nParams, 2, conn) < 0)
goto sendFailed;
/* Send parameters */
for (i = 0; i < nParams; i++)
{
if (paramValues && paramValues[i])