SPI_SCRO...SOR_FETCH(3)
π NAME π
okay so bestie, you're reading the SPI_scroll_cursor_fetch(3) page from the PostgreSQL 16.15 docs β and it's literally about SPI_scroll_cursor_fetch: fetch some rows from a cursor. slay.
β¨ SYNOPSIS β¨
void SPI_scroll_cursor_fetch(Portal portal, FetchDirection direction,
long count)
π¦ DESCRIPTION π¦
SPI_scroll_cursor_fetch fetches some rows from a cursor. This is equivalent to the SQL command FETCH. no cap, that's the whole main-character move π
π ARGUMENTS π
Portal portalβ the portal containing the cursor, periodt.FetchDirection directionβ one ofFETCH_FORWARD,FETCH_BACKWARD,FETCH_ABSOLUTEorFETCH_RELATIVE.long countβ number of rows to fetch forFETCH_FORWARDorFETCH_BACKWARD; absolute row number to fetch forFETCH_ABSOLUTE; or relative row number to fetch forFETCH_RELATIVE.
π RETURN VALUE π
SPI_processed and SPI_tuptable are set as in SPI_execute if successful. that's the vibe check β
πΈ NOTES πΈ
See the SQL FETCH(7) command for details of the interpretation of the direction and count parameters.
heads up bestie: direction values other thanFETCH_FORWARDmay fail if the cursor's plan was not created with theCURSOR_OPT_SCROLLoption. not me warning you with love ππ
made with love under the PostgreSQL 16.15 banner, dated 2026 β mwah π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16-docs 16.15-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