Insert CommandCounterIncrement call into SPI_cursor_open.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Nov 2001 18:30:58 +0000 (18:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Nov 2001 18:30:58 +0000 (18:30 +0000)
src/backend/executor/spi.c

index a790277bae710354633fca80288b41b1438dd492..8c6499de4cf403b46e22ea65abc4c948ff1aeb6f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.62 2001/11/10 23:51:14 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.63 2001/11/21 18:30:58 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -730,6 +730,9 @@ SPI_cursor_open(char *name, void *plan, Datum *Values, char *Nulls)
    else if (queryTree->into != NULL)
        elog(ERROR, "plan in SPI_cursor_open() must NOT be a SELECT INTO");
 
+   /* Increment CommandCounter to see changes made by now */
+   CommandCounterIncrement();
+
    /* Reset SPI result */
    SPI_processed = 0;
    SPI_tuptable = NULL;