1SPI_CURSOR_FETCH(3)      PostgreSQL 14.3 Documentation     SPI_CURSOR_FETCH(3)
2
3
4

NAME

6       SPI_cursor_fetch - fetch some rows from a cursor
7

SYNOPSIS

9       void SPI_cursor_fetch(Portal portal, bool forward, long count)
10

DESCRIPTION

12       SPI_cursor_fetch fetches some rows from a cursor. This is equivalent to
13       a subset of the SQL command FETCH (see SPI_scroll_cursor_fetch for more
14       functionality).
15

ARGUMENTS

17       Portal portal
18           portal containing the cursor
19
20       bool forward
21           true for fetch forward, false for fetch backward
22
23       long count
24           maximum number of rows to fetch
25

RETURN VALUE

27       SPI_processed and SPI_tuptable are set as in SPI_execute if successful.
28

NOTES

30       Fetching backward may fail if the cursor's plan was not created with
31       the CURSOR_OPT_SCROLL option.
32
33
34
35PostgreSQL 14.3                      2022                  SPI_CURSOR_FETCH(3)
Impressum