Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v
retrieving revision 1.258
diff -c -c -r1.258 libpq.sgml
*** doc/src/sgml/libpq.sgml	1 Jun 2008 16:23:08 -0000	1.258
--- doc/src/sgml/libpq.sgml	23 Jun 2008 21:09:39 -0000
***************
*** 1397,1402 ****
--- 1397,1410 ----
              If the array pointer is null then all parameters are presumed
              to be text strings.
             </para>
+            <para>
+             Values passed in binary format require knowlege of
+             the internal representation expected by the backend.
+             For example, integers must be passed in network byte
+             order.  Passing <type>numeric</> values requires
+             knowledge of the server storage format, as implemented
+             in <filename>src/backend/utils/adt/numeric.c</>.
+            </para>
            </listitem>
           </varlistentry>
  
Index: src/interfaces/libpq/fe-exec.c
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v
retrieving revision 1.195
diff -c -c -r1.195 fe-exec.c
*** src/interfaces/libpq/fe-exec.c	29 May 2008 22:02:44 -0000	1.195
--- src/interfaces/libpq/fe-exec.c	23 Jun 2008 21:09:39 -0000
***************
*** 976,987 ****
  			goto sendFailed;
  	}
  
! 	/* construct the Bind message */
  	if (pqPutMsgStart('B', false, conn) < 0 ||
  		pqPuts("", conn) < 0 ||
  		pqPuts(stmtName, conn) < 0)
  		goto sendFailed;
  
  	if (nParams > 0 && paramFormats)
  	{
  		if (pqPutInt(nParams, 2, conn) < 0)
--- 976,988 ----
  			goto sendFailed;
  	}
  
! 	/* 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,1006 ****
--- 1002,1008 ----
  	if (pqPutInt(nParams, 2, conn) < 0)
  		goto sendFailed;
  
+ 	/* Send parameters */
  	for (i = 0; i < nParams; i++)
  	{
  		if (paramValues && paramValues[i])
