Postgresql 中文操作指南
SPI_scroll_cursor_fetch
SPI_scroll_cursor_fetch — 从游标中获取某些行
SPI_scroll_cursor_fetch — fetch some rows from a cursor
Description
SPI_scroll_cursor_fetch 从游标中获取某些行。这等同于 SQL 命令 FETCH 。
SPI_scroll_cursor_fetch fetches some rows from a cursor. This is equivalent to the SQL command FETCH.
Arguments
-
Portal _portal_
-
portal containing the cursor
-
-
FetchDirection _direction_
-
one of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or FETCH_RELATIVE
-
-
long _count_
-
number of rows to fetch for FETCH_FORWARD or FETCH_BACKWARD; absolute row number to fetch for FETCH_ABSOLUTE; or relative row number to fetch for FETCH_RELATIVE
-
Return Value
如果成功,则 SPI_processed 和 SPI_tuptable 与 SPI_execute 中的设置相同。
SPI_processed and SPI_tuptable are set as in SPI_execute if successful.
Notes
有关 direction 和 count 参数解释的详细信息,请参阅 SQL FETCH 命令。
See the SQL FETCH command for details of the interpretation of the direction and count parameters.
如果未使用 CURSOR_OPT_SCROLL 选项创建游标的计划,则 FETCH_FORWARD 以外の其他方向值可能会失败。
Direction values other than FETCH_FORWARD may fail if the cursor’s plan was not created with the CURSOR_OPT_SCROLL option.