PostgreSQL Manual
This manual is provided as a courtesy. It is not an official source. Please check postgresql.org for updated information.
void SPI_cursor_fetch(Portal portal, bool forward, long count)
SPI_cursor_fetch fetches some rows from a cursor. This is equivalent to the SQL command FETCH.
SPI_cursor_fetch
portal containing the cursor
true for fetch forward, false for fetch backward
maximum number of rows to fetch
SPI_processed and SPI_tuptable are set as in SPI_execute if successful.
SPI_execute