Postgresql Check If Value Contains String Python