---
name: "SPI_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_cursor_move"
---

# SPI\_cursor\_move(3)

move a cursor

## NAME

SPI\_cursor\_move - move a cursor

## SYNOPSIS

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

## DESCRIPTION

**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

Moving backward may fail if the cursor's plan was not created with the CURSOR\_OPT\_SCROLL option.
