How can I convert from Double Precision to Bigint with PostgreSQL?
There are two ways to typecast in Postgres:

You either do it the SQL standard way: 

select cast(3.141593 as bigint);


or you could use the Postgres-specific cast operator: :: 

select (3.141593 :: bigint);


You might also want to consider the various rounding functions.