SPI_cursor_close(portal)
Portal containing cursor
SPI_cursor_close closes a previously created cursor and releases its Portal storage.
All open cursors are closed implicitly at transaction end. SPI_cursor_close need only be invoked if it is desirable to release resources sooner.