SPI_CURSOR_FIND(3)
π 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
- opensuse-leap 16.0: postgresql13-docs 13.23-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