]> begriffs open source - ai-pg/blob - full-docs/txt/spi-spi-scroll-cursor-fetch.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / spi-spi-scroll-cursor-fetch.txt
1
2 SPI_scroll_cursor_fetch
3
4    SPI_scroll_cursor_fetch — fetch some rows from a cursor
5
6 Synopsis
7
8 void SPI_scroll_cursor_fetch(Portal portal, FetchDirection direction,
9                              long count)
10
11 Description
12
13    SPI_scroll_cursor_fetch fetches some rows from a cursor. This is
14    equivalent to the SQL command FETCH.
15
16 Arguments
17
18    Portal portal
19           portal containing the cursor
20
21    FetchDirection direction
22           one of FETCH_FORWARD, FETCH_BACKWARD, FETCH_ABSOLUTE or
23           FETCH_RELATIVE
24
25    long count
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
29
30 Return Value
31
32    SPI_processed and SPI_tuptable are set as in SPI_execute if successful.
33
34 Notes
35
36    See the SQL FETCH command for details of the interpretation of the
37    direction and count parameters.
38
39    Direction values other than FETCH_FORWARD may fail if the cursor's plan
40    was not created with the CURSOR_OPT_SCROLL option.