Postgresql Function Variable In Coding