]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_scroll_cursor_fetch.3
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / man3 / SPI_scroll_cursor_fetch.3
1 '\" t
2 .\"     Title: SPI_scroll_cursor_fetch
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "SPI_SCROLL_CURSOR_FETCH" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 SPI_scroll_cursor_fetch \- fetch some rows from a cursor
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 void SPI_scroll_cursor_fetch(Portal \fIportal\fR, FetchDirection \fIdirection\fR,
36                              long \fIcount\fR)
37 .fi
38 .SH "DESCRIPTION"
39 .PP
40 \fBSPI_scroll_cursor_fetch\fR
41 fetches some rows from a cursor\&. This is equivalent to the SQL command
42 \fBFETCH\fR\&.
43 .SH "ARGUMENTS"
44 .PP
45 Portal \fIportal\fR
46 .RS 4
47 portal containing the cursor
48 .RE
49 .PP
50 FetchDirection \fIdirection\fR
51 .RS 4
52 one of
53 FETCH_FORWARD,
54 FETCH_BACKWARD,
55 FETCH_ABSOLUTE
56 or
57 FETCH_RELATIVE
58 .RE
59 .PP
60 long \fIcount\fR
61 .RS 4
62 number of rows to fetch for
63 FETCH_FORWARD
64 or
65 FETCH_BACKWARD; absolute row number to fetch for
66 FETCH_ABSOLUTE; or relative row number to fetch for
67 FETCH_RELATIVE
68 .RE
69 .SH "RETURN VALUE"
70 .PP
71 \fISPI_processed\fR
72 and
73 \fISPI_tuptable\fR
74 are set as in
75 \fBSPI_execute\fR
76 if successful\&.
77 .SH "NOTES"
78 .PP
79 See the SQL
80 \fBFETCH\fR(7)
81 command for details of the interpretation of the
82 \fIdirection\fR
83 and
84 \fIcount\fR
85 parameters\&.
86 .PP
87 Direction values other than
88 FETCH_FORWARD
89 may fail if the cursor\*(Aqs plan was not created with the
90 CURSOR_OPT_SCROLL
91 option\&.