Postgresql While Loop Exit In Python What Is A Data