SPI_CURSOR_FETCH(3)

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

πŸ’– NAME πŸ’–

okay bestie, welcome to SPI_CURSOR_FETCH(3) from the PostgreSQL 16.15 Documentation β€” this one is literally about SPI_cursor_fetch, which fetches some rows from a cursor. iconic behavior, no cap.

✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So SPI_cursor_fetch fetches some rows from a cursor. That’s the whole vibe. πŸ’…

It’s equivalent to a subset of the SQL command FETCH β€” and if you want more functionality, go look at SPI_scroll_cursor_fetch, because that one has extra main character energy. πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • Portal portal β€” the portal containing the cursor 🫢
  • bool forward β€” true for fetch forward, false for fetch backward πŸ”₯
  • long count β€” maximum number of rows to fetch ⭐

🌈 RETURN VALUE 🌈

If it’s successful, SPI_processed and SPI_tuptable are set as in SPI_execute. periodt. πŸ’–

🌸 NOTES 🌸

Fetching backward may fail if the cursor’s plan was not created with the CURSOR_OPT_SCROLL option. bestie, consider this your vibe check before going backward. 😭

mwah πŸ’‹ β€” this little page is sourced from PostgreSQL 16.15, dated 2026. catch you in the next manpage, bestie! πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from