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 7d05b31cdd22cee62fd2dda44d89382e9ee5ec65..305e002bf8e94a42be303938b0beeab18da6ba62 100644 (file)
@@ -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;