77 *
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.76 1999/03/1416:46 :21 momjian Exp $
10+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.77 1999/03/1418:12 :21 momjian Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -467,7 +467,6 @@ static void
467467parseInput (PGconn * conn )
468468{
469469char id ;
470- static int pendingT = 0 ;
471470
472471/*
473472 * Loop to parse successive complete messages available in the buffer.
@@ -536,16 +535,7 @@ parseInput(PGconn *conn)
536535PGRES_COMMAND_OK );
537536if (pqGets (conn -> result -> cmdStatus ,CMDSTATUS_LEN ,conn ))
538537return ;
539- if (pendingT ) {
540- /* Check the returned message */
541- /* if it's a SELECT or FETCH in a pendingT case, */
542- /* then it probably means no rows returned. */
543- /* We clear pendingT in that case. */
544- if ((strncmp (conn -> result -> cmdStatus ,"SELECT" ,6 )== 0 )||
545- (strncmp (conn -> result -> cmdStatus ,"FETCH" ,5 )== 0 ))
546- pendingT = 0 ;
547- }
548- if (!pendingT )conn -> asyncStatus = PGASYNC_READY ;
538+ conn -> asyncStatus = PGASYNC_READY ;
549539break ;
550540case 'E' :/* error return */
551541if (pqGets (conn -> errorMessage ,ERROR_MSG_LENGTH ,conn ))
@@ -555,11 +545,10 @@ parseInput(PGconn *conn)
555545/* and build an error result holding the error message */
556546conn -> result = PQmakeEmptyPGresult (conn ,
557547PGRES_FATAL_ERROR );
558- if (! pendingT ) conn -> asyncStatus = PGASYNC_READY ;
548+ conn -> asyncStatus = PGASYNC_READY ;
559549break ;
560550case 'Z' :/* backend is ready for new query */
561551conn -> asyncStatus = PGASYNC_IDLE ;
562- pendingT = 0 ;
563552break ;
564553case 'I' :/* empty query */
565554/* read and throw away the closing '\0' */
@@ -574,7 +563,7 @@ parseInput(PGconn *conn)
574563if (conn -> result == NULL )
575564conn -> result = PQmakeEmptyPGresult (conn ,
576565PGRES_EMPTY_QUERY );
577- if (! pendingT ) conn -> asyncStatus = PGASYNC_READY ;
566+ conn -> asyncStatus = PGASYNC_READY ;
578567break ;
579568case 'K' :/* secret key data from the backend */
580569
@@ -595,15 +584,11 @@ parseInput(PGconn *conn)
595584break ;
596585case 'T' :/* row descriptions (start of query
597586 * results) */
598- if (pendingT ) {
599- DONOTICE (conn ,"Got second 'T' message!\n" );
600- }
601587if (conn -> result == NULL )
602588{
603589/* First 'T' in a query sequence */
604590if (getRowDescriptions (conn ))
605591return ;
606- pendingT = 1 ;
607592}
608593else
609594{
@@ -615,13 +600,11 @@ parseInput(PGconn *conn)
615600 * We stop parsing until the application accepts
616601 * the current result.
617602 */
618- pendingT = 0 ;
619603conn -> asyncStatus = PGASYNC_READY ;
620604return ;
621605}
622606break ;
623607case 'D' :/* ASCII data tuple */
624- pendingT = 0 ;
625608if (conn -> result != NULL )
626609{
627610/* Read another tuple of a normal query response */
@@ -639,7 +622,6 @@ parseInput(PGconn *conn)
639622}
640623break ;
641624case 'B' :/* Binary data tuple */
642- pendingT = 0 ;
643625if (conn -> result != NULL )
644626{
645627/* Read another tuple of a normal query response */
@@ -657,15 +639,12 @@ parseInput(PGconn *conn)
657639}
658640break ;
659641case 'G' :/* Start Copy In */
660- pendingT = 0 ;
661642conn -> asyncStatus = PGASYNC_COPY_IN ;
662643break ;
663644case 'H' :/* Start Copy Out */
664- pendingT = 0 ;
665645conn -> asyncStatus = PGASYNC_COPY_OUT ;
666646break ;
667647default :
668- pendingT = 0 ;
669648sprintf (conn -> errorMessage ,
670649"unknown protocol character '%c' read from backend. "
671650"(The protocol character is the first character the "