For cursors, there is FETCH and MOVE, why no TELL?

Поиск
Список
Период
Сортировка
От Marc Balmer
Тема For cursors, there is FETCH and MOVE, why no TELL?
Дата
Msg-id 54D87FF6.302@msys.ch
обсуждение исходный текст
Ответы Re: For cursors, there is FETCH and MOVE, why no TELL?  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: For cursors, there is FETCH and MOVE, why no TELL?  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: For cursors, there is FETCH and MOVE, why no TELL?  (Hakan Kocaman <hkocam@gmail.com>)
Список pgsql-hackers
Currently there are FETCH and the (non standard) MOVE commands to work
on cursors.

(I use cursors to display large datasets in a page-wise way, where the
user can move per-page, or, when displaying a single record, per record.When the user goes back from per-record view to
page-view,I have to
 
restore the cursor to the position it was on before the user changed to
per-record view.)

I have to "manually" keep track of the cursor position, but in some
cases it would definitely be easier to just query the current cursor
position directly from the database and later use "MOVE ABSOLUTE" to
rewind it to that position.  That could be achieved e.g. by a
hypothetical "TELL <cursor-name>" command.  It does, however, not exist
and I have not found an alternative.  Is there a way to query the
current cusros position at all?  If not, does a TELL command sound like
a good or bad idea?



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: 9.6 Feature help requested: Inclusion Constraints
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: For cursors, there is FETCH and MOVE, why no TELL?