3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "MOVE" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
MOVE \- position a cursor
28
MOVE [ \fIdirection\fR [ FROM | IN ] ] \fIcursor_name\fR
30
where \fIdirection\fR can be empty or one of:
50
repositions a cursor without retrieving any data\&.
52
works exactly like the
54
command, except it only positions the cursor and does not return rows\&.
56
The parameters for the
58
command are identical to those of the
62
for details on syntax and usage\&.
65
On successful completion, a
67
command returns a command tag of the form
81
is the number of rows that a
83
command with the same parameters would have returned (possibly zero)\&.
91
DECLARE liahona CURSOR FOR SELECT * FROM films;
93
\-\- Skip the first 5 rows:
94
MOVE FORWARD 5 IN liahona;
97
\-\- Fetch the 6th row from the cursor liahona:
99
code | title | did | date_prod | kind | len
100
\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-
101
P_303 | 48 Hrs | 103 | 1982\-10\-22 | Action | 01:37
104
\-\- Close the cursor liahona and end the transaction:
115
statement in the SQL standard\&.
117
\fBCLOSE\fR(7), \fBDECLARE\fR(7), \fBFETCH\fR(7)