SPI_CURSOR_FIND(3)

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

✨ SPI_CURSOR_FIND ✨

okay bestie, welcome to the PostgreSQL 18.6 Documentation πŸ’– this one's a little server-programming-interface gem and honestly it's giving "detective but make it portals" πŸ”βœ¨


🌸 NAME 🌸

SPI_cursor_find β€” find an existing cursor by name πŸ•΅οΈβ™€οΈ


πŸŽ€ SYNOPSIS πŸŽ€

Portal SPI_cursor_find(const char * name)

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, SPI_cursor_find goes and finds an existing portal by its name. that's the whole vibe πŸ’…

and the way this is primarily useful? it's for when some other function hands you back a cursor name as text and you're like "okay slay but what IS that, actually" β€” and this function is how you resolve it into an actual portal. no cap. πŸ‘‘


🌈 ARGUMENTS 🌈

  • const char * name β€” the name of the portal, babe. that's the thing you're looking for 🫢

⭐ RETURN VALUE ⭐

a pointer to the portal with the specified name 🎯 … or NULL if none was found 😭 (yeah, it happens, we move on)


πŸ’œ NOTES πŸ’œ

beware, bestie!! ⚠️ this function can totally return you a Portal object that does not have cursor-like properties. like, for example, it might not return tuples at all πŸ™ˆ so do not just assume "portal = cursor vibes" because it is not always that.

if you simply pass that Portal pointer to other SPI functions, they can defend themselves against such cases β€” they got their own back πŸ›‘οΈβœ¨ but when you're directly inspecting the Portal yourself? caution is appropriate, fr fr. read it carefully, don't be reckless with it πŸ’…


and that's the whole page, gorgeous πŸŽ€ go forth and resolve those cursor names ✨

sign-off szn πŸ’– this lil doc comes to you from PostgreSQL 18.6, dated 2026, and it lives its life as SPI_CURSOR_FIND(3). stan. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from