Postgresql Loop Through Array Python Example Questions