Postgresql Get Index Of Array Python Example Problem