SPI_CURSOR_FIND(3)

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

πŸŽ€ SPI_CURSOR_FIND(3) πŸŽ€

okay so bestie, we are lowkey deep in the PostgreSQL 13.23 Documentation, and this page is literally called SPI_CURSOR_FIND. It’s giving β€œfind a portal by name” main character energy, and we’re gonna walk through it together, no cap. πŸ’…

🌸 NAME 🌸

SPI_cursor_find β€” find an existing cursor by name. That’s the whole vibe. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

Portal SPI_cursor_find(const char * name)

πŸ’– DESCRIPTION πŸ’–

SPI_cursor_find finds an existing portal by name. This is primarily useful to resolve a cursor name returned as text by some other function. So basically: portal by name, found. The main-character use case? Resolving a cursor name that some other function handed you back as text. Iconic. 🫢

🌈 ARGUMENTS 🌈

  • const char * name β€” the name of the portal. That’s it, that’s the argument. πŸŽ€

⭐ RETURN VALUE ⭐

A pointer to the portal with the specified name, or NULL if none was found. Yep, that simple β€” if it’s not there, you get NULL, bestie. πŸ¦‹

⚠️ NOTES ⚠️

Beware, bestie: this function can return a Portal object that does not have cursor-like properties β€” for example, it might not return tuples. 😭

If you simply pass the Portal pointer to other SPI functions, they can defend themselves against such cases, but caution is appropriate when directly inspecting the Portal. Like, for real, keep your eyes open when you’re digging into that Portal yourself. πŸ”₯


xoxo, stay hydrated and portal-safe β€” signed off by the PostgreSQL 13.23 docs, dated 2025 πŸ’œπŸ’…

πŸ“¦ where this page comes from