88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-protocol3.c,v 1.6 2003/08/04 02:40:20 momjian Exp $
11+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-protocol3.c,v 1.7 2003/08/12 21:34:44 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -232,8 +232,7 @@ pqParseInput3(PGconn *conn)
232232if (pqGetInt (& (conn -> be_key ),4 ,conn ))
233233return ;
234234break ;
235- case 'T' :/* row descriptions (start of query
236- * results) */
235+ case 'T' :/* Row Description */
237236if (conn -> result == NULL )
238237{
239238/* First 'T' in a query sequence */
@@ -253,6 +252,17 @@ pqParseInput3(PGconn *conn)
253252return ;
254253}
255254break ;
255+ case 'n' :/* No Data */
256+ /*
257+ * NoData indicates that we will not be seeing a
258+ * RowDescription message because the statement or
259+ * portal inquired about doesn't return rows.
260+ * Set up a COMMAND_OK result, instead of TUPLES_OK.
261+ */
262+ if (conn -> result == NULL )
263+ conn -> result = PQmakeEmptyPGresult (conn ,
264+ PGRES_COMMAND_OK );
265+ break ;
256266case 'D' :/* Data Row */
257267if (conn -> result != NULL &&
258268conn -> result -> resultStatus == PGRES_TUPLES_OK )