File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.258 2008/06/01 16:23:08 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.259 2008/06/23 21:10:49 momjian Exp $ -->
2
2
3
3
<chapter id="libpq">
4
4
<title><application>libpq</application> - C Library</title>
@@ -1397,6 +1397,14 @@ PGresult *PQexecParams(PGconn *conn,
1397
1397
If the array pointer is null then all parameters are presumed
1398
1398
to be text strings.
1399
1399
</para>
1400
+ <para>
1401
+ Values passed in binary format require knowlege of
1402
+ the internal representation expected by the backend.
1403
+ For example, integers must be passed in network byte
1404
+ order. Passing <type>numeric</> values requires
1405
+ knowledge of the server storage format, as implemented
1406
+ in <filename>src/backend/utils/adt/numeric.c</>.
1407
+ </para>
1400
1408
</listitem>
1401
1409
</varlistentry>
1402
1410
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.195 2008/05/29 22:02:44 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.196 2008/06/23 21:10:49 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -976,12 +976,13 @@ PQsendQueryGuts(PGconn *conn,
976
976
goto sendFailed ;
977
977
}
978
978
979
- /* construct the Bind message */
979
+ /* Construct the Bind message */
980
980
if (pqPutMsgStart ('B' , false, conn ) < 0 ||
981
981
pqPuts ("" , conn ) < 0 ||
982
982
pqPuts (stmtName , conn ) < 0 )
983
983
goto sendFailed ;
984
984
985
+ /* Send parameter formats */
985
986
if (nParams > 0 && paramFormats )
986
987
{
987
988
if (pqPutInt (nParams , 2 , conn ) < 0 )
@@ -1001,6 +1002,7 @@ PQsendQueryGuts(PGconn *conn,
1001
1002
if (pqPutInt (nParams , 2 , conn ) < 0 )
1002
1003
goto sendFailed ;
1003
1004
1005
+ /* Send parameters */
1004
1006
for (i = 0 ; i < nParams ; i ++ )
1005
1007
{
1006
1008
if (paramValues && paramValues [i ])
You can’t perform that action at this time.
0 commit comments