Postgresql Plpgsql Loop Through Array Python Initialize Two Dimensional Array