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_close(Portal portal)
SPI_cursor_close closes a previously created cursor and releases its portal storage.
SPI_cursor_close
All open cursors are closed automatically at the end of a transaction. SPI_cursor_close need only be invoked if it is desirable to release resources sooner.
portal containing the cursor