mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Cause FETCH 1 to return the current cursor row, or zero if at
beginning/end of cursor. Have MOVE return 0/1 depending on cursor position. Matches SQL spec. Pass cursor counter from parser as a long rather than int. Doc updates.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.21 2002/04/21 19:02:39 thomas Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.22 2002/12/30 15:31:47 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -89,7 +89,7 @@ FETCH [ FORWARD | BACKWARD | RELATIVE ] [ <replaceable class="PARAMETER">#</repl
|
||||
<para>
|
||||
A signed integer that specifies how many rows to fetch.
|
||||
Note that a negative integer is equivalent to changing the sense of
|
||||
FORWARD and BACKWARD.
|
||||
FORWARD and BACKWARD. Zero re-fetches the current row.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -180,30 +180,6 @@ WARNING: FETCH/ABSOLUTE not supported, using RELATIVE
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><computeroutput>
|
||||
ERROR: FETCH/RELATIVE at current position is not supported
|
||||
</computeroutput></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<acronym>SQL92</acronym> allows one to repetitively retrieve the cursor
|
||||
at its <quote>current position</quote> using the syntax
|
||||
<synopsis>
|
||||
FETCH RELATIVE 0 FROM <replaceable class="PARAMETER">cursor</replaceable>.
|
||||
</synopsis>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<productname>PostgreSQL</productname> does not currently support
|
||||
this notion; in fact the value zero is reserved to indicate that
|
||||
all rows should be retrieved and is equivalent to specifying the ALL keyword.
|
||||
If the RELATIVE keyword has been used, <productname>PostgreSQL</productname>
|
||||
assumes that the user intended <acronym>SQL92</acronym> behavior
|
||||
and returns this error message.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/move.sgml,v 1.14 2002/11/13 00:44:08 momjian Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/move.sgml,v 1.15 2002/12/30 15:31:47 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -35,8 +35,8 @@ MOVE [ <replaceable class="PARAMETER">direction</replaceable> ]
|
||||
Description
|
||||
</title>
|
||||
<para>
|
||||
<command>MOVE</command> allows a user to move cursor position a specified
|
||||
number of rows.
|
||||
<command>MOVE</command> allows a user to move the cursor position a
|
||||
specified number of rows.
|
||||
<command>MOVE</command> works like the <command>FETCH</command> command,
|
||||
but only positions the cursor and does not return rows.
|
||||
<replaceable class="PARAMETER">LAST</replaceable> moves to the end
|
||||
|
Reference in New Issue
Block a user