2 SPI_scroll_cursor_fetch
4 SPI_scroll_cursor_fetch — fetch some rows from a cursor
8 void SPI_scroll_cursor_fetch(Portal portal, FetchDirection direction,
13 SPI_scroll_cursor_fetch fetches some rows from a cursor. This is
14 equivalent to the SQL command FETCH.
19 portal containing the cursor
21 FetchDirection direction
22 one of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or
26 number of rows to fetch for FETCH_FORWARD or FETCH_BACKWARD;
27 absolute row number to fetch for FETCH_ABSOLUTE; or relative row
28 number to fetch for FETCH_RELATIVE
32 SPI_processed and SPI_tuptable are set as in SPI_execute if successful.
36 See the SQL FETCH command for details of the interpretation of the
37 direction and count parameters.
39 Direction values other than FETCH_FORWARD may fail if the cursor's plan
40 was not created with the CURSOR_OPT_SCROLL option.