SPI_SCROL...RSOR_MOVE(3)
π« SPI_SCROL...RSOR_MOVE π«
okay bestie, welcome to the PostgreSQL 18.6 docs, page SPI_SCROL...RSOR_MOVE(3). yes the name is truncated, no we're not gonna talk about it, it's giving β¨mysteriousβ¨. anyway this is the page about SPI_scroll_cursor_move and it's lowkey so useful.
πΈ NAME πΈ
SPI_scroll_cursor_move β move a cursor π¦
β¨ SYNOPSIS β¨
void SPI_scroll_cursor_move(Portal portal, FetchDirection direction,
long count)
π DESCRIPTION π
SPI_scroll_cursor_move skips over some number of rows in a cursor. literally that's it, that's the whole job. it's equivalent to the SQL command MOVE. no cap π«Ά
π ARGUMENTS π
Portal portalβ the portal that's holding the cursor πFetchDirection directionβ one ofFETCH_FORWARD,FETCH_BACKWARD,FETCH_ABSOLUTEorFETCH_RELATIVE. pick your vibe π₯long countβ here's the tea, the meaning shifts depending on your direction:- for
FETCH_FORWARDorFETCH_BACKWARD: the number of rows to move - for
FETCH_ABSOLUTE: the absolute row number to move to - for
FETCH_RELATIVE: the relative row number to move to
- for
π RETURN VALUE π
if it works, SPI_processed is set as in SPI_execute. and SPI_tuptable is set to NULL, since no rows are returned by this function. it moved, it didn't bring anything back. it's a mover not a giver, iykyk π
π§ NOTES π§
- go read the SQL
FETCH(7)command if you want the full details on howdirectionandcountare interpreted. fr fr, it's all in there π - β οΈ direction values other than
FETCH_FORWARDmay fail if the cursor's plan was not created with theCURSOR_OPT_SCROLLoption. so like... check that first, bestie, don't get caught out π
PostgreSQL 18.6 Β· 2026 Β· SPI_SCROL...RSOR_MOVE(3)
and that's the whole page! π mwah, go move some cursors, you absolute icon, and remember: scroll responsibly β¨ππ¦
π¦ where this page comes from
- alpine 3.23: postgresql18-doc 18.6-r0 Β· PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 Β· PostgreSQL
- arch rolling: postgresql 18.6-4 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-doc-18 18.6-0ubuntu0.26.04.1 Β· PostgreSQL
- ubuntu stonking: postgresql-doc-18 18.6-3build2 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms