SPI_CURSOR_FETCH(3)

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

πŸ’… SPI_CURSOR_FETCH(3) β€” bestie edition πŸ’…

Okay so welcome to the SPI_cursor_fetch page from the PostgreSQL 17.11 Documentation, and yes bestie, we’re gonna make cursor fetching make sense. ✨

πŸŽ€ NAME πŸŽ€

SPI_cursor_fetch β€” fetch some rows from a cursor. That’s the whole assignment, no cap. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

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

🌸 DESCRIPTION 🌸

SPI_cursor_fetch fetches some rows from a cursor. It’s literally equivalent to a subset of the SQL command FETCH β€” and if you want more functionality, the page says to see SPI_scroll_cursor_fetch, iykyk. πŸ’…

✨ ARGUMENTS ✨

  • Portal portal β€” the portal containing the cursor, bestie. That’s the vibe.
  • bool forward β€” true for fetch forward, false for fetch backward. Periodt.
  • long count β€” maximum number of rows to fetch. The limit, the cap, the max. πŸ‘‘

πŸ‘‘ RETURN VALUE πŸ‘‘

SPI_processed and SPI_tuptable are set as in SPI_execute if successful. Slay. πŸ’…

⭐ NOTES ⭐

Fetching backward may fail if the cursor’s plan was not created with the CURSOR_OPT_SCROLL option. So like… if you’re trying to go backward without that option, it’s giving β€œmay fail,” and you should know that, fr fr. 😭


And that’s the page, bestie β€” signed off by PostgreSQL 17.11, dated 2026, with SPI_CURSOR_FETCH(3) living its main character moment. πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from