SPI_CURSOR_MOVE(3)

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

✨ NAME ✨

okay so bestie, welcome to SPI_CURSOR_MOVE(3) β€” it's giving PostgreSQL 17.11 docs energy, and this page is all about SPI_cursor_move, which is literally β€œmove a cursor” πŸ’…. no cap, that’s the whole vibe.

πŸŽ€ SYNOPSIS πŸŽ€

void SPI_cursor_move(Portal portal, bool forward, long count)

πŸ’– DESCRIPTION πŸ’–

SPI_cursor_move skips over some number of rows in a cursor. lowkey it’s equivalent to a subset of the SQL command MOVE β€” and if you want more functionality, see SPI_scroll_cursor_move, iykyk πŸ¦‹.

🌸 ARGUMENTS 🌸

  • Portal portal β€” the portal containing the cursor, aka where the cursor lives 🫢
  • bool forward β€” true for move forward, false for move backward. fr fr, that’s the direction switch ⭐
  • long count β€” the maximum number of rows to move. iconic limit behavior πŸ‘‘

πŸ¦‹ NOTES πŸ¦‹

bestie, heads up: moving backward may fail if the cursor’s plan was not created with the CURSOR_OPT_SCROLL option 😭. not me being dramatic, that’s just the rule πŸ’€

mwah πŸ’‹ β€” signing off from the PostgreSQL 17.11 docs, dated 2026, and this was SPI_CURSOR_MOVE(3) 🫢

πŸ“¦ where this page comes from