Re: count and limit

Поиск
Список
Период
Сортировка
От Chris
Тема Re: count and limit
Дата
Msg-id 44E50B24.5090208@gmail.com
обсуждение исходный текст
Ответ на count and limit  ("Fabio Victora Hecht" <fabiovh@gmail.com>)
Ответы Re: count and limit  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: count and limit  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Fabio Victora Hecht wrote:
> Hi!
>
> I've been using Postgresql for a while now and I'm very satisfied.
>
> I was wondering if there's a way to count the results of a query and
> return part of the result set it in one query (LIMIT). Because I usually
> have to count the results using one query (to tell the user how many
> records match the criteria) and show the first 20 records.

I was going to suggest a cursor but I don't think you can get the number
of results a cursor has :(

--
Postgresql & php tutorials
http://www.designmagick.com/

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: select * from users where user_id NOT in (select
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Dynamic Partial Index