From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: MOVE LAST: why?
Date: Wed, 08 Jan 2003 13:58:30 +0900
Message-ID: <3E1BAFF6.B0114A67@tpf.co.jp> (raw)
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>
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Tom Lane wrote:
> >> Sure. FETCH n in Postgres has always corresponded to FETCH RELATIVE n.
>
> > IIRC in SQL standard FETCH retrieves rows one by one.
>
> Yes, Postgres' idea of FETCH is only weakly related to the spec's idea.
> But I believe you get similar results if you consider only the row last
> returned by our FETCH.
FETCH n is a PostgreSQL's extention to retrieve multiple
rows by one FETCH not related to FETCH RELATIVE at all.
FETCH LAST should return the last one row.
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.
regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/
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: Inoue@tpf.co.jp, tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org
Subject: Re: MOVE LAST: why?
In-Reply-To: <3E1BAFF6.B0114A67@tpf.co.jp>
* 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