]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_cursor_fetch.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_cursor_fetch.3
1 '\" t
2 .\"     Title: SPI_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_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_cursor_fetch \- fetch some rows from a cursor
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 void SPI_cursor_fetch(Portal \fIportal\fR, bool \fIforward\fR, long \fIcount\fR)
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBSPI_cursor_fetch\fR
40 fetches some rows from a cursor\&. This is equivalent to a subset of the SQL command
41 \fBFETCH\fR
42 (see
43 \fBSPI_scroll_cursor_fetch\fR
44 for more functionality)\&.
45 .SH "ARGUMENTS"
46 .PP
47 Portal \fIportal\fR
48 .RS 4
49 portal containing the cursor
50 .RE
51 .PP
52 bool \fIforward\fR
53 .RS 4
54 true for fetch forward, false for fetch backward
55 .RE
56 .PP
57 long \fIcount\fR
58 .RS 4
59 maximum number of rows to fetch
60 .RE
61 .SH "RETURN VALUE"
62 .PP
63 \fISPI_processed\fR
64 and
65 \fISPI_tuptable\fR
66 are set as in
67 \fBSPI_execute\fR
68 if successful\&.
69 .SH "NOTES"
70 .PP
71 Fetching backward may fail if the cursor\*(Aqs plan was not created with the
72 CURSOR_OPT_SCROLL
73 option\&.