Postgresql Plpgsql Loop Through Array Powershell Execution