Search Postgresql Archives

Re: Select count with offset returns nothing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Uckun <timuckun@xxxxxxxxx> writes:
> I am using a library which is emitting SQL like this  SELECT COUNT(*)
> FROM batches LIMIT 15 OFFSET 15 the library fails because on postgres
> this query returns nothing (not even zero as a result). Presumably it
> returns some valid value on mysql and other databases.

FWIW, I just tried it on mysql 5.5.2, and got results similar to
Postgres: the limit/offset are considered to apply to the single
aggregated row, not the aggregate's input rows as that library
seems to be expecting.  I wonder what database they were using
for testing ...

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux