Postgres - how to typecast sum(bigint) to bigint? Postgres - how to typecast sum(bigint) to bigint? postgresql postgresql

Postgres - how to typecast sum(bigint) to bigint?


Just use:

select sum(big_col)::bigint as total from big_table

And you should upgrade to a supported version (e.g. 9.x) as soon as possible.