SPI_CURSOR_MOVE(3)

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

πŸ’« SPI_CURSOR_MOVE(3) πŸ’«

okay so bestie, this one's from the PostgreSQL 16.15 Documentation β€” it's a SPI (server programming interface) function, and it's literally just about scooting a cursor around. lowkey iconic, fr fr.


✨ NAME ✨

SPI_cursor_move β€” move a cursor πŸŽ€


🌸 SYNOPSIS 🌸

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

that's the whole thing. she's short, she's sweet, she does exactly one job πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so SPI_cursor_move skips over some number of rows in a cursor. that's it. that's the vibe ✨

it's equivalent to a subset of the SQL command MOVE β€” and if you want more functionality than this little subset gives you, go check out SPI_scroll_cursor_move instead. iykyk 🫢


πŸ“ ARGUMENTS πŸ“

  • Portal portal β€” the portal containing the cursor. that's your cursor's home base, her main character location πŸ’–
  • bool forward β€” true means move forward, false means move backward. yes queen, direction matters 😌
  • long count β€” the maximum number of rows to move. emphasis on maximum β€” she's not gonna move more than that, no cap 🚫

πŸ’€ NOTES πŸ’€

⚠️ moving backward may fail if the cursor's plan was not created with the CURSOR_OPT_SCROLL option. so like… if you're going backwards and it's not working, that's probably why. not your fault bestie, it's the plan 😭

πŸ‘‘ SEE ALSO πŸ‘‘

not gonna lie, the original page doesn't list any SEE ALSO references β€” so there's nothing to link here, and we're not about to invent one, periodt πŸ’…


so yeah! that's the whole page. go forth and move those cursors, bestie β€” forward or backward (assuming your plan is scroll-y enough). πŸŒˆβ­πŸ’œ

this page came to you from PostgreSQL 16.15, dated 2026 β€” and it's the SPI_CURSOR_MOVE(3) page in the PostgreSQL documentation set. mwah, bye πŸŽ€πŸ’–πŸ§š

πŸ“¦ where this page comes from