Commit cfb7ed41 authored by Bruce Momjian's avatar Bruce Momjian

This is another example of why not allowing utility functions in SPI

would be a Bad Thing.

For what it's worth, I found another case in libpq where you can get a T
message without a D that my utility patch needs to handle.  I have
attached
the updated patch against the 6.4.2 version of
src/interfaces/libpq/fe-exec.c

Jerry Gay
parent c10e6bcb
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.75 1999/03/14 16:42:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.76 1999/03/14 16:46:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -538,10 +538,11 @@ parseInput(PGconn *conn) ...@@ -538,10 +538,11 @@ parseInput(PGconn *conn)
return; return;
if (pendingT) { if (pendingT) {
/* Check the returned message */ /* Check the returned message */
/* if it's a SELECT in a pendingT case, */ /* if it's a SELECT or FETCH in a pendingT case, */
/* then it probably means no rows returned. */ /* then it probably means no rows returned. */
/* We clear pendingT in that case. */ /* We clear pendingT in that case. */
if (strncmp(conn->result->cmdStatus, "SELECT", 6) == 0) if ((strncmp(conn->result->cmdStatus, "SELECT", 6) == 0) ||
(strncmp(conn->result->cmdStatus, "FETCH", 5) == 0))
pendingT = 0; pendingT = 0;
} }
if (!pendingT) conn->asyncStatus = PGASYNC_READY; if (!pendingT) conn->asyncStatus = PGASYNC_READY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment