Postgres Use Variable In String Python Definition