Postgresql 中文操作指南

SPI_cursor_move

SPI_cursor_move — 移动游标

SPI_cursor_move — move a cursor

Synopsis

void SPI_cursor_move(Portal portal, bool forward, long count)

Description

SPI_cursor_move 跳过游标中的一些行数。这相当于 SQL 命令 MOVE 的一个子集(请参阅 SPI_scroll_cursor_move 了解更多功能)。

SPI_cursor_move skips over some number of rows in a cursor. This is equivalent to a subset of the SQL command MOVE (see SPI_scroll_cursor_move for more functionality).

Arguments

  • Portal _portal_

    • portal containing the cursor

  • bool _forward_

    • true for move forward, false for move backward

  • long _count_

    • maximum number of rows to move

Notes

如果未使用 CURSOR_OPT_SCROLL 选项创建光标计划,向后移动可能会失败。

Moving backward may fail if the cursor’s plan was not created with the CURSOR_OPT_SCROLL option.