Re: MOVE LAST: why?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
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 05:06:15
Message-ID: 1082.1042002375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-01-08 05:31:01 Re: redo error?
Previous Message Tom Lane 2003-01-08 04:58:44 Re: redo error?

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gerhard Hintermayer 2003-01-08 06:39:05 Re: still memory leaks with libpgtcl
Previous Message Hiroshi Inoue 2003-01-08 04:58:30 Re: MOVE LAST: why?