@@ -3,7 +3,7 @@ doc/src/sgml/ref/fetch.sgml
3
3
PostgreSQL documentation
4
4
-->
5
5
6
- <refentry id="SQL-FETCH ">
6
+ <refentry id="sql-fetch ">
7
7
8
8
<!--==========================orignal english content==========================
9
9
<indexterm zone="sql-fetch">
@@ -112,14 +112,14 @@ ____________________________________________________________________________-->
112
112
<!--==========================orignal english content==========================
113
113
<para>
114
114
A cursor has an associated position, which is used by
115
- <command>FETCH</>. The cursor position can be before the first row of the
115
+ <command>FETCH</command >. The cursor position can be before the first row of the
116
116
query result, on any particular row of the result, or after the last row
117
117
of the result. When created, a cursor is positioned before the first row.
118
118
After fetching some rows, the cursor is positioned on the row most recently
119
- retrieved. If <command>FETCH</> runs off the end of the available rows
119
+ retrieved. If <command>FETCH</command > runs off the end of the available rows
120
120
then the cursor is left positioned after the last row, or before the first
121
- row if fetching backward. <command>FETCH ALL</> or <command>FETCH BACKWARD
122
- ALL</> will always leave the cursor positioned after the last row or before
121
+ row if fetching backward. <command>FETCH ALL</command > or <command>FETCH BACKWARD
122
+ ALL</command > will always leave the cursor positioned after the last row or before
123
123
the first row.
124
124
</para>
125
125
____________________________________________________________________________-->
@@ -136,8 +136,8 @@ ____________________________________________________________________________-->
136
136
137
137
<!--==========================orignal english content==========================
138
138
<para>
139
- The forms <literal>NEXT</>, <literal>PRIOR</>, <literal>FIRST</>,
140
- <literal>LAST</>, <literal>ABSOLUTE</>, <literal>RELATIVE</> fetch
139
+ The forms <literal>NEXT</literal >, <literal>PRIOR</literal >, <literal>FIRST</literal >,
140
+ <literal>LAST</literal >, <literal>ABSOLUTE</literal >, <literal>RELATIVE</literal > fetch
141
141
a single row after moving the cursor appropriately. If there is no
142
142
such row, an empty result is returned, and the cursor is left
143
143
positioned before the first row or after the last row as
@@ -153,7 +153,7 @@ ____________________________________________________________________________-->
153
153
154
154
<!--==========================orignal english content==========================
155
155
<para>
156
- The forms using <literal>FORWARD</> and <literal>BACKWARD</>
156
+ The forms using <literal>FORWARD</literal > and <literal>BACKWARD</literal >
157
157
retrieve the indicated number of rows moving in the forward or
158
158
backward direction, leaving the cursor positioned on the
159
159
last-returned row (or after/before all rows, if the <replaceable
@@ -171,8 +171,8 @@ ____________________________________________________________________________-->
171
171
172
172
<!--==========================orignal english content==========================
173
173
<para>
174
- <literal>RELATIVE 0</>, <literal>FORWARD 0</>, and
175
- <literal>BACKWARD 0</> all request fetching the current row without
174
+ <literal>RELATIVE 0</literal >, <literal>FORWARD 0</literal >, and
175
+ <literal>BACKWARD 0</literal > all request fetching the current row without
176
176
moving the cursor, that is, re-fetching the most recently fetched
177
177
row. This will succeed unless the cursor is positioned before the
178
178
first row or after the last row; in which case, no row is returned.
@@ -189,15 +189,15 @@ ____________________________________________________________________________-->
189
189
<!--==========================orignal english content==========================
190
190
<para>
191
191
This page describes usage of cursors at the SQL command level.
192
- If you are trying to use cursors inside a <application>PL/pgSQL</>
192
+ If you are trying to use cursors inside a <application>PL/pgSQL</application >
193
193
function, the rules are different —
194
- see <xref linkend="plpgsql-cursors" >.
194
+ see <xref linkend="plpgsql-cursor-using"/ >.
195
195
</para>
196
196
____________________________________________________________________________-->
197
197
<para>
198
198
这个页面描述在 SQL 命令层面上对游标的使用。如果想要在
199
199
<application>PL/pgSQL</application>函数中使用游标,规则会有所不同
200
- — 请见<xref linkend="plpgsql-cursors "/>。
200
+ — 请见<xref linkend="plpgsql-cursor-using "/>。
201
201
</para>
202
202
</note>
203
203
</refsect1>
@@ -535,10 +535,10 @@ ____________________________________________________________________________-->
535
535
<!--==========================orignal english content==========================
536
536
<para><replaceable class="parameter">count</replaceable> is a
537
537
possibly-signed integer constant, determining the location or
538
- number of rows to fetch. For <literal>FORWARD</> and
539
- <literal>BACKWARD</> cases, specifying a negative <replaceable
538
+ number of rows to fetch. For <literal>FORWARD</literal > and
539
+ <literal>BACKWARD</literal > cases, specifying a negative <replaceable
540
540
class="parameter">count</replaceable> is equivalent to changing
541
- the sense of <literal>FORWARD</> and <literal>BACKWARD</>.
541
+ the sense of <literal>FORWARD</literal > and <literal>BACKWARD</literal >.
542
542
</para>
543
543
____________________________________________________________________________-->
544
544
<para><replaceable class="parameter">count</replaceable>
@@ -578,7 +578,7 @@ ____________________________________________________________________________-->
578
578
579
579
<!--==========================orignal english content==========================
580
580
<para>
581
- On successful completion, a <command>FETCH</> command returns a command
581
+ On successful completion, a <command>FETCH</command > command returns a command
582
582
tag of the form
583
583
<screen>
584
584
FETCH <replaceable class="parameter">count</replaceable>
@@ -610,8 +610,8 @@ ____________________________________________________________________________-->
610
610
<!--==========================orignal english content==========================
611
611
<para>
612
612
The cursor should be declared with the <literal>SCROLL</literal>
613
- option if one intends to use any variants of <command>FETCH</>
614
- other than <command>FETCH NEXT</> or <command>FETCH FORWARD</> with
613
+ option if one intends to use any variants of <command>FETCH</command >
614
+ other than <command>FETCH NEXT</command > or <command>FETCH FORWARD</command > with
615
615
a positive count. For simple queries
616
616
<productname>PostgreSQL</productname> will allow backwards fetch
617
617
from cursors not declared with <literal>SCROLL</literal>, but this
@@ -648,9 +648,9 @@ ____________________________________________________________________________-->
648
648
649
649
<!--==========================orignal english content==========================
650
650
<para>
651
- <xref linkend="sql-declare">
651
+ <xref linkend="sql-declare"/ >
652
652
is used to define a cursor. Use
653
- <xref linkend="sql-move">
653
+ <xref linkend="sql-move"/ >
654
654
to change cursor position without retrieving data.
655
655
</para>
656
656
____________________________________________________________________________-->
@@ -775,8 +775,8 @@ ____________________________________________________________________________-->
775
775
776
776
<!--==========================orignal english content==========================
777
777
<para>
778
- The SQL standard allows only <literal>FROM</> preceding the cursor
779
- name; the option to use <literal>IN</>, or to leave them out altogether, is
778
+ The SQL standard allows only <literal>FROM</literal > preceding the cursor
779
+ name; the option to use <literal>IN</literal >, or to leave them out altogether, is
780
780
an extension.
781
781
</para>
782
782
____________________________________________________________________________-->
0 commit comments