SPI_CURSOR_FETCH(3)
π NAME π
SPI_cursor_fetch β fetch some rows from a cursor. This is the SPI_CURSOR_FETCH(3) manual page, bestie, and itβs short but iconic β¨
π SYNOPSIS π
void SPI_cursor_fetch(Portal portal, bool forward, long count)
πΈ DESCRIPTION πΈ
Okay so 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, go see SPI_scroll_cursor_fetch, iykyk π¦
β¨ ARGUMENTS β¨
Portal portalβ portal containing the cursor πbool forwardβtruefor fetch forward,falsefor fetch backward πlong countβ maximum number of rows to fetch π
π₯ RETURN VALUE π₯
SPI_processed and SPI_tuptable are set as in SPI_execute if successful. Thatβs the whole vibe π
π NOTES π
Fetching backward may fail if the cursorβs plan was not created with the CURSOR_OPT_SCROLL option. Not me warning you dramatically, but fr fr watch out for that π
xoxo, PostgreSQL 14.24 Documentation, dated 2026 β mwah ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14-docs 14.24-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