diff options
Diffstat (limited to 'src/interfaces/libpq/fe-exec.c')
-rw-r--r-- | src/interfaces/libpq/fe-exec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 832d61c544f..7bd5b3a7b9d 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -1329,7 +1329,8 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery) { /* * 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 || @@ -1355,6 +1356,11 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery) 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); |