Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQgzq-0008VU-7J for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2013 16:38:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQgzp-0008Ee-Dw for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2013 16:38:41 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQgzo-0008EY-Ex for pgsql-bugs@postgresql.org; Fri, 12 Apr 2013 16:38:40 +0000 Received: from mail-gg0-x22c.google.com ([2607:f8b0:4002:c02::22c]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQgzd-0005bF-RU for pgsql-bugs@postgresql.org; Fri, 12 Apr 2013 16:38:39 +0000 Received: by mail-gg0-f172.google.com with SMTP id f4so437521ggn.31 for ; Fri, 12 Apr 2013 09:38:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:x-mailer:mime-version :x-gm-message-state; bh=aU8q0VB9yqIDQ3aHORKX3SE92noF8pvFHwll5gpgLqU=; b=bcbtFqVw+KyqpIUcdjwMCHBfTZzsCtjPw4QHt3QvgBkkzoohLd8g99ih72oPW4yYl+ 6yRvkyWYLhNW1IB3wo9Vcjg39QOZJrspySSB+tiPf+b5O/MVstzKbU41vwBjet/QohTZ ka0X7W+IrZ1WfJrJGFzqQfqScfVo6aBa5aVBr7O1EF9XsWP7kRddCU1Op800QpFaFs/c BzcoylwGMJ3TGrlZsQzVleVTGYXCVCyurWKNQcdJi3s8ymtM7PSTyuITwd9IegNJIooF N34//IltIDwI/qXeouH1kPmcWvv8jMk52JRy1JZgLPRdmKDrDOJ12uZeeC6MA1Gza2VJ bSiQ== X-Received: by 10.236.152.230 with SMTP id d66mr6880182yhk.200.1365784708537; Fri, 12 Apr 2013 09:38:28 -0700 (PDT) Received: from [10.1.6.88] ([189.31.65.14]) by mx.google.com with ESMTPS id y5sm12685675yhd.3.2013.04.12.09.38.25 (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 09:38:27 -0700 (PDT) Message-ID: <1365784693.4410.42.camel@dba01> Subject: Re: BUG #8061: Not count limit offset From: "Dickson S. Guedes" To: claudiomsi@hotmail.com Cc: pgsql-bugs@postgresql.org Date: Fri, 12 Apr 2013 13:38:13 -0300 In-Reply-To: References: Organization: GuedeSoft Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-+l0irIupXb6/Py6SIuxJ" X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 X-Gm-Message-State: ALoCoQm9lzDNG/sgM0LsEejur3h15TdJFIHrppwFxBgtdrkz36QKuroCmn3DbT1PRj+83A6P2tDK X-Pg-Spam-Score: -1.9 (-) 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 --=-+l0irIupXb6/Py6SIuxJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Em Sex, 2013-04-12 =C3=A0s 14:57 +0000, claudiomsi@hotmail.com escreveu: > The following bug has been logged on the website: >=20 > Bug reference: 8061 > Logged by: Claudio Oliveira > Email address: claudiomsi@hotmail.com > PostgreSQL version: 9.2.4 > Operating system: WIN 8 > Description: =20 >=20 > select count(*) from teste; --- 5000 > select count(*) from teste limit 1000 offset 0; --- 5000 > select count(*) from teste limit 1000 offset 1; --- not returning=20 =46rom documentation [1]: "OFFSET says to skip that many rows before beginning to return rows. OFFSET 0 is the same as omitting the OFFSET clause, and LIMIT NULL is the same as omitting the LIMIT clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned." Notice that a "select count(*) from ... " will return _one_ line. [1] http://www.postgresql.org/docs/current/static/queries-limit.html --=20 Dickson S. Guedes mail/xmpp: guedes@guedesoft.net - skype: guediz http://guedesoft.net - http://www.postgresql.org.br http://www.rnp.br/keyserver/pks/lookup?search=3D0x8F3E3C06D428D10A --=-+l0irIupXb6/Py6SIuxJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJRaDh1AAoJEBa5zL7BI5C7no0IAMXLIIoNE94BLym6c74Reqqm c3HoGqJK48JhRvmkX5m6ccWfWz3yWYxi984ENnHq/YkSEhnkVXeAl+cnGeHkqzCw 1fMocAiJ6vBe2QF+ivuRv/tzHEsfkPLG72jhJxqmLLs0klBz1dmo4LLknoEanVhr ScbfZnbCKdAKKz9rHQ2WreNIdfJoqXWTQDxUMn8jEfxMpnxLoy7GC6+peBeStb7u oz4Szp3A8VBnoQSaZD9nRMg8BKERAVbDIlgstl854TkvzjHtsyn4RBmcg3CMZYdS z6qNyM4DdaspaD9mhcSIPQgXdeFzP4JM7lpDBQVfqx5wJOWyQ1Hvw+6KKaNMM1o= =ISxT -----END PGP SIGNATURE----- --=-+l0irIupXb6/Py6SIuxJ--