Re: Pls help - Limiting query results by percentage of results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Pls help - Limiting query results by percentage of results
Дата
Msg-id 21235.1061416046@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Pls help - Limiting query results by percentage of results  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-novice
Josh Berkus <josh@agliodbs.com> writes:
>> I am trying to limit the results of a query using the LIMIT clause - but
>> instead of an absolute number I would like to limit by a percentage of rows
>> returned.

> We don't have that feature, I'm afraid.   You'd have to write a procedure or
> subroutine which calculated that number an then passed it to LIMIT.

This sounds like a proxy for wanting to know the total number of rows
returned by the query, in advance of executing it.  But the backend has
no better idea than you do how many will be returned :-(

            regards, tom lane

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

Предыдущее
От: "Gaetano Mendola"
Дата:
Сообщение: Re: Starting PostgreSQL 7.3.4 server with Webmin
Следующее
От: Raigo77@solo.delfi.ee (Raigo)
Дата:
Сообщение: Starting PostgreSQL 7.3.4 server with Webmin