Variable Declaration In Postgresql Function For Trunc