{
/*
* In pipeline mode we cannot use the simple protocol, so we send
- * Parse, Bind, Describe Portal, Execute.
+ * Parse, Bind, Describe Portal, Execute, Close Portal (with the
+ * unnamed portal).
*/
if (pqPutMsgStart('P', conn) < 0 ||
pqPuts("", conn) < 0 ||
pqPutInt(0, 4, conn) < 0 ||
pqPutMsgEnd(conn) < 0)
goto sendFailed;
+ if (pqPutMsgStart('C', conn) < 0 ||
+ pqPutc('P', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
entry->queryclass = PGQUERY_EXTENDED;
entry->query = strdup(query);