Declare Variable In Postgresql Function For Trunc