Re: MOVE LAST: why?

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: MOVE LAST: why?
Дата
Msg-id 3E1BEFFE.88B57516@tpf.co.jp
обсуждение исходный текст
Ответ на Re: MOVE LAST: why?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: MOVE LAST: why?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> 
> Hiroshi Inoue <Inoue@tpf.co.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
correspondingrow      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 Inouehttp://w2422.nsk.ne.jp/~inoue/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: sync()
Следующее
От: Ian Barwick
Дата:
Сообщение: Re: psql and readline