Postgresql Function Variable Parameters In Python