title: PostgreSQL sum typecasting as a bigint
body: <p>I am doing the sum() of an integer column and I want to typecast the result to be a bigint - to avoid an error.  However when I try to use sum(myvalue)::bigint it still gives me an out of range error.</p>
  
  <p>Is there anything that I can do to the query to get this to work?  Or do I have to change the column type to a bigint?</p>