Postgresql While Loop Exit In Python How To Comment