From: | "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net> |
---|---|
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 16:38:13 |
Message-ID: | 1365784693.4410.42.camel@dba01 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Em Sex, 2013-04-12 às 14:57 +0000, claudiomsi(at)hotmail(dot)com escreveu:
> The following bug has been logged on the website:
>
> Bug reference: 8061
> Logged by: Claudio Oliveira
> Email address: claudiomsi(at)hotmail(dot)com
> PostgreSQL version: 9.2.4
> Operating system: WIN 8
> Description:
>
> select count(*) from teste; --- 5000
> select count(*) from teste limit 1000 offset 0; --- 5000
> select count(*) from teste limit 1000 offset 1; --- not returning
From 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
--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br
http://www.rnp.br/keyserver/pks/lookup?search=0x8F3E3C06D428D10A
From | Date | Subject | |
---|---|---|---|
Next Message | Tarvi Pillessaar | 2013-04-12 17:02:07 | Re: BUG #8059: sequence crash recovery is not working properly |
Previous Message | Dickson S. Guedes | 2013-04-12 15:56:04 | Re: BUG #8057: Unable to Connect PostgresSQL Remotely |