Re: Returning number of matches on a query when using limit

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Returning number of matches on a query when using limit
Date: 2009-01-13 21:04:11
Message-ID: 200901132204.11770.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 13 January 2009 21:56:56 Mohamed wrote:
> Hi. How would I return the number of matches found by a query, but when I
> only want to return 30 of them ?
> In MySQL there is a way of calling SQL_CALC_FOUND_ROWS to do this?
>
> Is there something similiar that can be done in PostgreSQL ? Do I have to
> rerun my query?
>
> Thanks / Moe

... RETURNING COUNT(*)

--
Fahrbahn ist ein graues Band
weisse Streifen, grüner Rand

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-01-13 21:17:25 Re: Cast for text->Integer missing in 8.3.5
Previous Message Mohamed 2009-01-13 20:56:56 Returning number of matches on a query when using limit