aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-03-14 16:46:21 +0000
committerBruce Momjian <bruce@momjian.us>1999-03-14 16:46:21 +0000
commitcfb7ed414dd9e7c12670599b887ef4f488cf8f7c (patch)
treee55063628832e690238bb8df83ca4e3b66fb4cd6
parentc10e6bcbed4b5a9ffea40300cff279cb854c1ba3 (diff)
downloadpostgresql-cfb7ed414dd9e7c12670599b887ef4f488cf8f7c.tar.gz
postgresql-cfb7ed414dd9e7c12670599b887ef4f488cf8f7c.zip
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
-rw-r--r--src/interfaces/libpq/fe-exec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 34f6d624656..774881f884e 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -7,7 +7,7 @@
*
*
* 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)
return;
if (pendingT) {
/* 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. */
/* 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;
}
if (!pendingT) conn->asyncStatus = PGASYNC_READY;