Search Postgresql Archives

Re: count(*) in binary mode returns 0

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

 



	imagenesis@xxxxxxxxx wrote:

> nfields: 1
> from_psql 00000000000000000000000000000000 bytes_to_read:4 read:4
> host_order 00000000000000000000000000000000 bytes_to_read:4 read:4
> conv_int ir:0

Note that count(*) produces a bigint (8 bytes), not an int (4 bytes).

=> select pg_typeof(count(1));
 pg_typeof 
-----------
 bigint
(1 row)

Can you check if your code does work when the query is simply
SELECT 1::bigint ?


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


-- 
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