Re: [INTERFACES] Methods for stepping through results?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] Methods for stepping through results?
Дата
Msg-id 27457.919180041@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Methods for stepping through results?  (Matthew Hagerty <matthew@venux.net>)
Ответы Re: [INTERFACES] Methods for stepping through results?  (Matthew Hagerty <matthew@venux.net>)
Re: [INTERFACES] Methods for stepping through results?  (Peter T Mount <peter@retep.org.uk>)
Список pgsql-interfaces
Matthew Hagerty <matthew@venux.net> writes:
> Is there any way to do the following:
> 1.  Return a query in groups of x (i.e. 10 or 20) and progressively return
> result groups of x.  Just think of search engine navigation.

DECLARE CURSOR ... FETCH ...

There has been some talk of providing a facility for this inside libpq,
where it could be used for handling the results of an ordinary SELECT.
But it doesn't seem real high priority, given that you can use a cursor.

> 2.  I have a client who wants to be able to select certain rows (tuples) of
> a result and then "re-submit" the query and have only those rows selected
> in the new results.  For example, if a query returns 10 rows and rows
> 2,4,7,9 are checked, when re-submitted only rows 2,4,7,9 would be returned.
>  I know it is kind of stupid, but I have to please the customer :(

Seems like something you should be handling inside your application.
Why would you "re-submit" the same query in the first place, if you
already have the results?

            regards, tom lane

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

Предыдущее
От: Matthew Hagerty
Дата:
Сообщение: Methods for stepping through results?
Следующее
От: Matthew Hagerty
Дата:
Сообщение: Re: [INTERFACES] Methods for stepping through results?