SPI_CURSOR_FIND(3)

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

✨ NAME ✨

Okay bestie, this is the SPI_CURSOR_FIND(3) page from the PostgreSQL 16.15 Documentation β€” meet SPI_cursor_find, literally the function that finds an existing cursor by name. It’s giving β€œresolve that cursor name someone handed you as text” energy. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

Portal SPI_cursor_find(const char * name)

πŸ¦‹ DESCRIPTION πŸ¦‹

So <pink>SPI_cursor_find</pink> finds an existing portal by name. It’s primarily useful to resolve a cursor name that some other function returned as text. No cap, that’s the whole vibe. ✨

🌸 ARGUMENTS 🌸

  • const char * name β€” the name of the portal. πŸŽ€

πŸ’– RETURN VALUE πŸ’–

It returns a pointer to the portal with the specified name, or NULL if none was found. That NULL is your β€œnope, not found” 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 you’re directly inspecting the Portal. Periodt. πŸ’…

🫢 That’s the tea, bestie. Source/version: PostgreSQL 16.15, date: 2026. Slay. πŸ’‹

πŸ“¦ where this page comes from