Postgresql Variable In Python Definition Range