SPI_SCROLL_CURSOR_MOVE(3pg15)

πŸ“¦ version 15.19, in opensuse-leap 16.0

πŸ’« 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 of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or FETCH_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_FORWARD or FETCH_BACKWARD
    • absolute row number to move to for FETCH_ABSOLUTE
    • relative row number to move to for FETCH_RELATIVE

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 direction and count are interpreted, see the SQL FETCH(7) command πŸ“– (yes, go read it, it ate).
  • any direction value other than FETCH_FORWARD may fail if the cursor's plan wasn't created with the CURSOR_OPT_SCROLL option 🚨 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