SPI_CURSOR_FETCH(3)
π
SPI_CURSOR_FETCH(3) β bestie edition π
Okay so welcome to the SPI_cursor_fetch page from the PostgreSQL 17.11 Documentation, and yes bestie, weβre gonna make cursor fetching make sense. β¨
π NAME π
SPI_cursor_fetch β fetch some rows from a cursor. Thatβs the whole assignment, no cap. π
π¦ SYNOPSIS π¦
void SPI_cursor_fetch(Portal portal, bool forward, long count)
πΈ DESCRIPTION πΈ
SPI_cursor_fetch fetches some rows from a cursor. Itβs literally equivalent to a subset of the SQL command FETCH β and if you want more functionality, the page says to see SPI_scroll_cursor_fetch, iykyk. π
β¨ ARGUMENTS β¨
Portal portalβ the portal containing the cursor, bestie. Thatβs the vibe.bool forwardβtruefor fetch forward,falsefor fetch backward. Periodt.long countβ maximum number of rows to fetch. The limit, the cap, the max. π
π RETURN VALUE π
SPI_processed and SPI_tuptable are set as in SPI_execute if successful. Slay. π
β NOTES β
Fetching backward may fail if the cursorβs plan was not created with the CURSOR_OPT_SCROLL option. So likeβ¦ if youβre trying to go backward without that option, itβs giving βmay fail,β and you should know that, fr fr. π
And thatβs the page, bestie β signed off by PostgreSQL 17.11, dated 2026, with SPI_CURSOR_FETCH(3) living its main character moment. π«Άπβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-docs 17.11-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms