Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit632b4ae

Browse files
committed
Doc: minor improvement in pl/pgsql FETCH/MOVE documentation.
Explain that you can use any integer expression for the "count" inpl/pgsql's versions of FETCH/MOVE, unlike the SQL versions which onlyallow a constant.Remove the duplicate version of this para under MOVE. I don't seea good reason to maintain two identical paras when we just said thatMOVE works exactly like FETCH.Per Pavel Stehule, though I didn't use his text.Discussion:https://postgr.es/m/CAFj8pRAcvSXcNdUGx43bOK1e3NNPbQny7neoTLN42af+8MYWEA@mail.gmail.com
1 parentcd073d8 commit632b4ae

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

‎doc/src/sgml/plpgsql.sgml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,6 +3196,10 @@ FETCH <optional> <replaceable>direction</replaceable> { FROM | IN } </optional>
31963196
<literal>BACKWARD</literal>.
31973197
Omitting <replaceable>direction</replaceable> is the same
31983198
as specifying <literal>NEXT</literal>.
3199+
In the forms using a <replaceable>count</replaceable>,
3200+
the <replaceable>count</replaceable> can be any integer-valued
3201+
expression (unlike the SQL <command>FETCH</command> command,
3202+
which only allows an integer constant).
31993203
<replaceable>direction</replaceable> values that require moving
32003204
backward are likely to fail unless the cursor was declared or opened
32013205
with the <literal>SCROLL</literal> option.
@@ -3233,26 +3237,6 @@ MOVE <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> <
32333237
be checked to see whether there was a next row to move to.
32343238
</para>
32353239

3236-
<para>
3237-
The <replaceable>direction</replaceable> clause can be any of the
3238-
variants allowed in the SQL <xref linkend="sql-fetch"/>
3239-
command, namely
3240-
<literal>NEXT</literal>,
3241-
<literal>PRIOR</literal>,
3242-
<literal>FIRST</literal>,
3243-
<literal>LAST</literal>,
3244-
<literal>ABSOLUTE</literal> <replaceable>count</replaceable>,
3245-
<literal>RELATIVE</literal> <replaceable>count</replaceable>,
3246-
<literal>ALL</literal>,
3247-
<literal>FORWARD</literal> <optional> <replaceable>count</replaceable> | <literal>ALL</literal> </optional>, or
3248-
<literal>BACKWARD</literal> <optional> <replaceable>count</replaceable> | <literal>ALL</literal> </optional>.
3249-
Omitting <replaceable>direction</replaceable> is the same
3250-
as specifying <literal>NEXT</literal>.
3251-
<replaceable>direction</replaceable> values that require moving
3252-
backward are likely to fail unless the cursor was declared or opened
3253-
with the <literal>SCROLL</literal> option.
3254-
</para>
3255-
32563240
<para>
32573241
Examples:
32583242
<programlisting>

‎doc/src/sgml/ref/fetch.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
9999
This page describes usage of cursors at the SQL command level.
100100
If you are trying to use cursors inside a <application>PL/pgSQL</application>
101101
function, the rules are different &mdash;
102-
see <xref linkend="plpgsql-cursors"/>.
102+
see <xref linkend="plpgsql-cursor-using"/>.
103103
</para>
104104
</note>
105105
</refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp