Postgresql 中文操作指南
Description
SPI_cursor_find 按名称查找现有分区。这主要用于解析由其他一些函数返回的游标名称文本。
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.
Return Value
指向具有指定名称的分区的指针,或在未找到分区时指向 NULL
pointer to the portal with the specified name, or NULL if none was found
Notes
请注意,此函数可返回没有类游标属性的 Portal 对象;例如,它可能不会返回元组。如果您只是将 Portal 指针传给其他 SPI 函数,它们可以自行针对此类情况进行防御,但直接检查 Portal 时应保持谨慎。
Beware that 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.