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 09:31:42
Message-ID: 3E1BEFFE.88B57516@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:
> > 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.

In SQL99 the spec you referred to seems the ii) of b) which
begins with the word *Otherwise*. I see the following before it.

a) If K is greater than 0 (zero) and not greater than N, then CR
is positioned on the K-th row of Tt and the corresponding row
of T. That row becomes the current row of CR.

Then I'm also suspicious if MOVE LAST should mean MOVE ALL.

> > 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?

I'm suspicios if we should implement scrollable cursors
with the combination of the current MOVE and FETCH implemen-
tation. For example the backwards FETCH operation for group
nodes isn't implemented properly yet(maybe). Should we fix
it or take another way ?

regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Barwick 2003-01-08 09:53:51 Re: psql and readline
Previous Message Tatsuo Ishii 2003-01-08 07:17:09 Re: sync()

Browse pgsql-interfaces by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2003-01-08 13:50:06 Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
Previous Message Key88 SF 2003-01-08 09:00:07 libpqxx Large Objects