Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQhO5-0002Y1-PD for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2013 17:03:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQhO5-0000Yq-8r for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2013 17:03:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQhO4-0000Yl-Oc for pgsql-bugs@postgresql.org; Fri, 12 Apr 2013 17:03:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQhO1-0004UQ-DN for pgsql-bugs@postgresql.org; Fri, 12 Apr 2013 17:03:44 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3CH3clT020401; Fri, 12 Apr 2013 13:03:39 -0400 (EDT) From: Tom Lane To: claudiomsi@hotmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8061: Not count limit offset In-reply-to: References: Comments: In-reply-to claudiomsi@hotmail.com message dated "Fri, 12 Apr 2013 14:57:35 -0000" Date: Fri, 12 Apr 2013 13:03:38 -0400 Message-ID: <20400.1365786218@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org claudiomsi@hotmail.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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs