SPI_SCROLL_CURSOR_MOVE(3pg14)

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

✨ NAME ✨

okay so bestie, this is the SPI_SCROL...RSOR_MOVE(3) page from the PostgreSQL 14.24 Documentation β€” yes, the title has that chaotic truncated energy, but the function is SPI_scroll_cursor_move, and it is literally here to move a cursor. πŸ’…

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. It is giving the exact same energy as the SQL command MOVE. Periodt. ✨

πŸ’… ARGUMENTS πŸ’…

  • Portal portal β€” the portal containing the cursor. That's the whole container vibe, iykyk. πŸŽ€
  • FetchDirection direction β€” one of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or FETCH_RELATIVE. Pick one, bestie. πŸ¦‹
  • long count β€” number of rows to move for FETCH_FORWARD or FETCH_BACKWARD; absolute row number to move to for FETCH_ABSOLUTE; or relative row number to move to for FETCH_RELATIVE. This one changes meaning depending on direction, so read the label fr fr. πŸ‘‘

⭐ RETURN VALUE ⭐

SPI_processed is set as in SPI_execute if successful. SPI_tuptable is set to NULL, since no rows are returned by this function. No rows, no table, no drama. πŸ’–

πŸ”₯ NOTES πŸ”₯

See the SQL FETCH(7) command for details of the interpretation of the direction and count parameters. Yes bestie, go read that for the nitty-gritty. 🌈

Heads up: direction values other than FETCH_FORWARD may fail if the cursor's plan was not created with the CURSOR_OPT_SCROLL option. This is not a drill β€” if the plan wasn't made with CURSOR_OPT_SCROLL, those other directions may fail. πŸ’€

πŸ’Œ cute little sign-off: source/version is PostgreSQL 14.24, and the date on this one is 2026. mwah πŸ’‹

πŸ“¦ where this page comes from