---
name: "SPI_scroll_cursor_move"
section: "3"
platform: "linux"
package: "postgresql"
version: "18.6-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SPI_scroll_cursor_move"
---

# SPI\_scroll\_cursor\_move(3)

move a cursor

## NAME

SPI\_scroll\_cursor\_move - move a cursor

## SYNOPSIS

```
void SPI_scroll_cursor_move(Portal portal, FetchDirection direction,
                            long count)
```

## DESCRIPTION

**SPI\_scroll\_cursor\_move** skips over some number of rows in a cursor. This is equivalent to the SQL command **MOVE**.

## 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 move for FETCH\_FORWARD or FETCH\_BACKWARD; absolute row number to move to for FETCH\_ABSOLUTE; or relative row number to move to for FETCH\_RELATIVE

## RETURN VALUE

*SPI\_processed* is set as in **SPI\_execute** if successful. *SPI\_tuptable* is set to NULL, since no rows are returned by this function.

## NOTES

See the SQL [**FETCH**(7)](/FETCH/7.md) command for details of the interpretation of the *direction* and *count* parameters.

Direction values other than FETCH\_FORWARD may fail if the cursor's plan was not created with the CURSOR\_OPT\_SCROLL option.
