From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: MOVE LAST: why?
Date: Tue, 4 Feb 2003 06:23:13 -0500 (EST)
Message-ID: <200302041123.h14BND004292@candle.pha.pa.us> (raw)
In-Reply-To: <3E3F21DA.DC6D43EB@tpf.co.jp>
Hiroshi Inoue wrote:
> Bruce Momjian wrote:
> >
> > It also clarifies the docs to mention it sits on the last row, not after
> > the last row.
>
> Is it true ?
Oops. I thought we didn't match the spec because we _didn't_ go past
the last row, but now I see it is because we do go past the last row.
Patch applied to revert. Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:/bjm/diff (text/plain, 3.6K) download
Index: doc/src/sgml/ref/fetch.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/fetch.sgml,v
retrieving revision 1.24
diff -c -c -r1.24 fetch.sgml
*** doc/src/sgml/ref/fetch.sgml 3 Feb 2003 14:04:24 -0000 1.24
--- doc/src/sgml/ref/fetch.sgml 4 Feb 2003 11:21:20 -0000
***************
*** 209,221 ****
<para>
The cursor position can be before the first row of the query result, or on
! any particular row of the result.
When created, a cursor is positioned before the first row. After fetching
some rows, the cursor is positioned on the last row retrieved. A new
<command>FETCH</command> always steps one row in the specified direction
(if possible) before beginning to return rows. If the
<command>FETCH</command> requests more rows than available, the cursor is
! left positioned on the last row of the query result (or on the first
row, in the case of a backward fetch). This will always be the case after
<command>FETCH ALL</>.
</para>
--- 209,221 ----
<para>
The cursor position can be before the first row of the query result, or 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 last row retrieved. A new
<command>FETCH</command> always steps one row in the specified direction
(if possible) before beginning to return rows. If the
<command>FETCH</command> requests more rows than available, the cursor is
! left positioned after the last row of the query result (or before the first
row, in the case of a backward fetch). This will always be the case after
<command>FETCH ALL</>.
</para>
***************
*** 225,231 ****
A zero row count requests 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; in which case, no row is returned.
</para>
</tip>
--- 225,231 ----
A zero row count requests 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.
</para>
</tip>
Index: doc/src/sgml/ref/move.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/move.sgml,v
retrieving revision 1.17
diff -c -c -r1.17 move.sgml
*** doc/src/sgml/ref/move.sgml 3 Feb 2003 14:04:24 -0000 1.17
--- doc/src/sgml/ref/move.sgml 4 Feb 2003 11:21:20 -0000
***************
*** 35,41 ****
<para>
<command>MOVE</command> allows the user to move the cursor position a
specified number of rows, or to the beginning or end of the cursor.
! <command>MOVE ALL</command> moves to the last row of the cursor.
<command>MOVE</command> works exactly like the <command>FETCH</command>
command, except it only repositions the cursor and does not return rows.
</para>
--- 35,41 ----
<para>
<command>MOVE</command> allows the user to move the cursor position a
specified number of rows, or to the beginning or end of the cursor.
! <command>MOVE ALL</command> moves to the end of the cursor.
<command>MOVE</command> works exactly like the <command>FETCH</command>
command, except it only repositions the cursor and does not return rows.
</para>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: pgman@candle.pha.pa.us, Inoue@tpf.co.jp, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: MOVE LAST: why?
In-Reply-To: <200302041123.h14BND004292@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox