Postgresql Function Variable Declaration In Python