anchor.diff:              throw({error, closed})
       end.
   
  +receive_extended_results(C, Ref, Results) ->
  +    try receive_extended_result(C, Ref, []) of
  +        done    -> lists:reverse(Results);
  +        R       -> receive_extended_results(C, Ref, [R | Results])
  +    catch
  +        throw:E -> E
  +    end.
  +
   receive_extended_result(C, Ref, Rows) ->
       receive
           {C, Ref, {data, Row}} ->
  
positive.code:             end;
          {C, Ref, {complete, _Type}} ->
              {ok, lists:reverse(Rows)};
          {'EXIT', C, _Reason} ->
              {error, closed}
      end.
  
negative.code: 
  execute_batch(C, Batch) ->
      Ref = ipgsql:execute_batch(C, Batch),
      case receive_extended_results(C, Ref, []) of
          [Result] -> Result;
          Results  -> Results
      end.
  