SPI_CURSOR_FIND(3)
β¨ 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
- alpine 3.23: postgresql18-doc 18.6-r0 Β· PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 Β· PostgreSQL
- arch rolling: postgresql 18.6-4 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-doc-18 18.6-0ubuntu0.26.04.1 Β· PostgreSQL
- ubuntu stonking: postgresql-doc-18 18.6-3build2 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms