1SPI_CURSOR_FIND(3) PostgreSQL 16.1 Documentation SPI_CURSOR_FIND(3)
2
3
4
6 SPI_cursor_find - find an existing cursor by name
7
9 Portal SPI_cursor_find(const char * name)
10
12 SPI_cursor_find finds an existing portal by name. This is primarily
13 useful to resolve a cursor name returned as text by some other
14 function.
15
17 const char * name
18 name of the portal
19
21 pointer to the portal with the specified name, or NULL if none was
22 found
23
25 Beware that this function can return a Portal object that does not have
26 cursor-like properties; for example it might not return tuples. If you
27 simply pass the Portal pointer to other SPI functions, they can defend
28 themselves against such cases, but caution is appropriate when directly
29 inspecting the Portal.
30
31
32
33PostgreSQL 16.1 2023 SPI_CURSOR_FIND(3)