aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/fe-exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index b40e6b9d514..3906a52c8cc 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.188 2006/07/04 13:22:15 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.189 2006/08/04 22:20:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -973,6 +973,7 @@ PQsendQueryGuts(PGconn *conn,
pqPuts("", conn) < 0 ||
pqPuts(stmtName, conn) < 0)
goto sendFailed;
+
if (nParams > 0 && paramFormats)
{
if (pqPutInt(nParams, 2, conn) < 0)
@@ -988,8 +989,10 @@ PQsendQueryGuts(PGconn *conn,
if (pqPutInt(0, 2, conn) < 0)
goto sendFailed;
}
+
if (pqPutInt(nParams, 2, conn) < 0)
goto sendFailed;
+
for (i = 0; i < nParams; i++)
{
if (paramValues && paramValues[i])