Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0CDDA476D72 for ; Wed, 8 Jan 2003 00:06:15 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 60A62476D44 for ; Wed, 8 Jan 2003 00:06:13 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0856F0U001083; Wed, 8 Jan 2003 00:06:15 -0500 (EST) To: Hiroshi Inoue Cc: Bruce Momjian , pgsql-hackers@postgresql.org Subject: Re: MOVE LAST: why? In-reply-to: <3E1BAFF6.B0114A67@tpf.co.jp> References: <200301072329.h07NT2X28922@candle.pha.pa.us> <27934.1041984327@sss.pgh.pa.us> <3E1B9DCD.75859501@tpf.co.jp> <501.1041997832@sss.pgh.pa.us> <3E1BA5E6.9463718F@tpf.co.jp> <863.1042000401@sss.pgh.pa.us> <3E1BAFF6.B0114A67@tpf.co.jp> Comments: In-reply-to Hiroshi Inoue message dated "Wed, 08 Jan 2003 13:58:30 +0900" Date: Wed, 08 Jan 2003 00:06:15 -0500 Message-ID: <1082.1042002375@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/376 X-Sequence-Number: 33986 Hiroshi Inoue writes: > FETCH LAST should return the last one row. That's not clear to me. Generally, I would think the cursor should remain positioned on whatever row is returned, but the spec clearly says that the final cursor position after FETCH LAST is *after* the last row. Nor do I see where exactly it says that the last row is the one to return in this case; the spec seems to treat LAST the same as PRIOR, so that the *first* row encountered in the movement direction might be the one to return. Can you disentangle the spec wording for me? > FETCH RELATIVE m should return a row after skipping > m rows if we follow the SQL standard and so the current > implementation of FETCH RELATIVE is broken. No objection to that here. Are you volunteering to make it do that? regards, tom lane