Re: BUG #8061: Not count limit offset

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: claudiomsi(at)hotmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8061: Not count limit offset
Date: 2013-04-12 17:03:38
Message-ID: 20400.1365786218@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

claudiomsi(at)hotmail(dot)com writes:
> select count(*) from teste; --- 5000
> select count(*) from teste limit 1000 offset 0; --- 5000
> select count(*) from teste limit 1000 offset 1; --- not returning

Of course. I think perhaps what you are looking for is

select count(*) from (select 1 from teste limit ...) ss;

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2013-04-12 17:07:54 Re: BUG #8059: sequence crash recovery is not working properly
Previous Message Tarvi Pillessaar 2013-04-12 17:02:07 Re: BUG #8059: sequence crash recovery is not working properly