SPI_CURSOR_FIND(3)
π SPI_CURSOR_FIND(3) π
okay so bestie, welcome to the PostgreSQL 15.19 docs β specifically the SPI_CURSOR_FIND(3) page, and honestly? it's a short one but it eats. let me walk you through it π«Ά
β¨ NAME β¨
SPI_cursor_find β find an existing cursor by name π
β¨ SYNOPSIS β¨
Portal SPI_cursor_find(const char * name)
β¨ DESCRIPTION β¨
so SPI_cursor_find finds an existing portal by name. that's the whole vibe. π
it's primarily useful for one specific thing: resolving a cursor name that some other function handed you back as text. like, someone gave you a name string and you're standing there like "ok but which portal is this π" β that's the moment this function exists for. iconic behavior honestly, main character energy.
β¨ ARGUMENTS β¨
const char * nameβ the name of the portal. that's it, that's the whole argument. very low maintenance, we love a simple signature πΈ
β¨ RETURN VALUE β¨
a pointer to the portal with the specified name β or NULL if none was found. no portal, no pointer, no drama π
β¨ NOTES β¨
okay listen, this is the part where we get a little serious because it matters:
beware β this function can return a Portal object that does not have cursor-like properties. for example, it might not return tuples. π
so if you're just passing that Portal pointer along to other SPI functions? you're fine, bestie β they can defend themselves against these cases. but if you're going to be directly inspecting the Portal yourself? caution is appropriate. that's the whole warning, fr fr. read it, internalize it, don't rawdog a Portal inspection ππ
β and that's the page! lowkey one of the shorter ones, but every detail is doing its job. this was pulled from the PostgreSQL 15.19 Documentation set, dated 2026 β same version, same date, same SPI_CURSOR_FIND(3) energy, just with way more sparkle β¨π
π
go find those portals, bestie β you got this ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15-docs 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms