Re: MOVE LAST: why?

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: MOVE LAST: why?
Date: 2003-01-08 04:58:30
Message-ID: 3E1BAFF6.B0114A67@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-08 04:58:44 Re: redo error?
Previous Message Bruce Momjian 2003-01-08 04:39:27 Re: MOVE LAST: why?

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-01-08 05:06:15 Re: MOVE LAST: why?
Previous Message Bruce Momjian 2003-01-08 04:39:27 Re: MOVE LAST: why?