SPI_SCROLL_CURSOR_MOVE(3pg15)
π« SPI_scroll_cursor_move β bestie edition π«
okay so real talk: this is the SPI_scroll_cursor_move page from the PostgreSQL 15.19 docs (that's manual section 3, the library-call girlies), and it's genuinely so much simpler than the name makes it look. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
SPI_scroll_cursor_move β literally just moving a cursor, that's the whole vibe π
β¨ SYNOPSIS β¨
void SPI_scroll_cursor_move(Portal portal, FetchDirection direction,
long count)
look at her. three arguments. icon behavior, no notes π
β¨ DESCRIPTION β¨
so SPI_scroll_cursor_move skips over some number of rows in a cursor. that's it, that's the function π¦
it's equivalent to the SQL command MOVE β like, deadass the same thing, so if you already know MOVE you already know her, iykyk π
β¨ ARGUMENTS β¨
Portal portalβ the portal that's holding the cursor. she's the main character here πFetchDirection directionβ one ofFETCH_FORWARD,FETCH_BACKWARD,FETCH_ABSOLUTEorFETCH_RELATIVEπ pick your fighter.long countβ the number, and what it means changes depending on direction (rude, but okay):- number of rows to move for
FETCH_FORWARDorFETCH_BACKWARD - absolute row number to move to for
FETCH_ABSOLUTE - relative row number to move to for
FETCH_RELATIVE
- number of rows to move for
ngl, that last one is the part everyone gets wrong, so likeβ¦ read it twice bestie π
β¨ RETURN VALUE β¨
if it works, SPI_processed gets set exactly as in SPI_execute. slay β
and SPI_tuptable is set to NULL, because no rows are returned by this function β she doesn't bring you snacks, she just moves π like okay, fair enough.
β¨ NOTES β¨
- for the details on how
directionandcountare interpreted, see the SQLFETCH(7)command π (yes, go read it, it ate). - any direction value other than
FETCH_FORWARDmay fail if the cursor's plan wasn't created with theCURSOR_OPT_SCROLLoption π¨ no cap, that's a real limitation, so don't come for me when it errors out π
ok that's the whole page, you're officially a cursor-moving girlie now π₯ go forth and scroll, carefully π
π that's a wrap, babe! this came straight from the PostgreSQL 15.19 docs, dated 2026, and the whole thing is filed under SPI_scroll_cursor_move(3) β mwah, see you in the next manpage πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15-docs 15.19-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