if (!PQsendQueryStart(conn, newQuery))
return 0;
- entry = pqAllocCmdQueueEntry(conn);
- if (entry == NULL)
- return 0; /* error msg already set */
-
/* check the argument */
if (!query)
{
return 0;
}
+ entry = pqAllocCmdQueueEntry(conn);
+ if (entry == NULL)
+ return 0; /* error msg already set */
+
/* Send the query message(s) */
if (conn->pipelineStatus == PQ_PIPELINE_OFF)
{
pqPutMsgEnd(conn) < 0)
{
/* error message should be set up already */
+ pqRecycleCmdQueueEntry(conn, entry);
return 0;
}