mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Don't use SGML empty tags
For DocBook XML compatibility, don't use SGML empty tags (</>) anymore, replace by the full tag name. Add a warning option to catch future occurrences. Alexander Lakhin, Jürgen Purtz
This commit is contained in:
@@ -57,20 +57,20 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
|
||||
|
||||
<para>
|
||||
A cursor has an associated position, which is used by
|
||||
<command>FETCH</>. The cursor position can be before the first row of the
|
||||
<command>FETCH</command>. The cursor position can be before the first row of the
|
||||
query result, on any particular row of the result, or after the last row
|
||||
of the result. When created, a cursor is positioned before the first row.
|
||||
After fetching some rows, the cursor is positioned on the row most recently
|
||||
retrieved. If <command>FETCH</> runs off the end of the available rows
|
||||
retrieved. If <command>FETCH</command> runs off the end of the available rows
|
||||
then the cursor is left positioned after the last row, or before the first
|
||||
row if fetching backward. <command>FETCH ALL</> or <command>FETCH BACKWARD
|
||||
ALL</> will always leave the cursor positioned after the last row or before
|
||||
row if fetching backward. <command>FETCH ALL</command> or <command>FETCH BACKWARD
|
||||
ALL</command> will always leave the cursor positioned after the last row or before
|
||||
the first row.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The forms <literal>NEXT</>, <literal>PRIOR</>, <literal>FIRST</>,
|
||||
<literal>LAST</>, <literal>ABSOLUTE</>, <literal>RELATIVE</> fetch
|
||||
The forms <literal>NEXT</literal>, <literal>PRIOR</literal>, <literal>FIRST</literal>,
|
||||
<literal>LAST</literal>, <literal>ABSOLUTE</literal>, <literal>RELATIVE</literal> fetch
|
||||
a single row after moving the cursor appropriately. If there is no
|
||||
such row, an empty result is returned, and the cursor is left
|
||||
positioned before the first row or after the last row as
|
||||
@@ -78,7 +78,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The forms using <literal>FORWARD</> and <literal>BACKWARD</>
|
||||
The forms using <literal>FORWARD</literal> and <literal>BACKWARD</literal>
|
||||
retrieve the indicated number of rows moving in the forward or
|
||||
backward direction, leaving the cursor positioned on the
|
||||
last-returned row (or after/before all rows, if the <replaceable
|
||||
@@ -87,8 +87,8 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literal>RELATIVE 0</>, <literal>FORWARD 0</>, and
|
||||
<literal>BACKWARD 0</> all request fetching the current row without
|
||||
<literal>RELATIVE 0</literal>, <literal>FORWARD 0</literal>, and
|
||||
<literal>BACKWARD 0</literal> all request fetching the current row without
|
||||
moving the cursor, that is, re-fetching the most recently fetched
|
||||
row. This will succeed unless the cursor is positioned before the
|
||||
first row or after the last row; in which case, no row is returned.
|
||||
@@ -97,7 +97,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
|
||||
<note>
|
||||
<para>
|
||||
This page describes usage of cursors at the SQL command level.
|
||||
If you are trying to use cursors inside a <application>PL/pgSQL</>
|
||||
If you are trying to use cursors inside a <application>PL/pgSQL</application>
|
||||
function, the rules are different —
|
||||
see <xref linkend="plpgsql-cursors">.
|
||||
</para>
|
||||
@@ -274,10 +274,10 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
|
||||
<listitem>
|
||||
<para><replaceable class="parameter">count</replaceable> is a
|
||||
possibly-signed integer constant, determining the location or
|
||||
number of rows to fetch. For <literal>FORWARD</> and
|
||||
<literal>BACKWARD</> cases, specifying a negative <replaceable
|
||||
number of rows to fetch. For <literal>FORWARD</literal> and
|
||||
<literal>BACKWARD</literal> cases, specifying a negative <replaceable
|
||||
class="parameter">count</replaceable> is equivalent to changing
|
||||
the sense of <literal>FORWARD</> and <literal>BACKWARD</>.
|
||||
the sense of <literal>FORWARD</literal> and <literal>BACKWARD</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -297,7 +297,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
|
||||
<title>Outputs</title>
|
||||
|
||||
<para>
|
||||
On successful completion, a <command>FETCH</> command returns a command
|
||||
On successful completion, a <command>FETCH</command> command returns a command
|
||||
tag of the form
|
||||
<screen>
|
||||
FETCH <replaceable class="parameter">count</replaceable>
|
||||
@@ -315,8 +315,8 @@ FETCH <replaceable class="parameter">count</replaceable>
|
||||
|
||||
<para>
|
||||
The cursor should be declared with the <literal>SCROLL</literal>
|
||||
option if one intends to use any variants of <command>FETCH</>
|
||||
other than <command>FETCH NEXT</> or <command>FETCH FORWARD</> with
|
||||
option if one intends to use any variants of <command>FETCH</command>
|
||||
other than <command>FETCH NEXT</command> or <command>FETCH FORWARD</command> with
|
||||
a positive count. For simple queries
|
||||
<productname>PostgreSQL</productname> will allow backwards fetch
|
||||
from cursors not declared with <literal>SCROLL</literal>, but this
|
||||
@@ -400,8 +400,8 @@ COMMIT WORK;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The SQL standard allows only <literal>FROM</> preceding the cursor
|
||||
name; the option to use <literal>IN</>, or to leave them out altogether, is
|
||||
The SQL standard allows only <literal>FROM</literal> preceding the cursor
|
||||
name; the option to use <literal>IN</literal>, or to leave them out altogether, is
|
||||
an extension.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
Reference in New Issue
Block a user