anchor.diff:                   squery ->
                        case State#state.results of
                            [Result] ->
  -                             reply(State, Result);
  +                             finish(State, done, Result);
                            Results ->
  -                             reply(State, lists:reverse(Results))
  +                             finish(State, done, lists:reverse(Results))
                        end;
                    equery ->
                        [Result] = State#state.results,
  -                     reply(State, Result);
  +                     finish(State, done, Result);
                    sync ->
  -                     reply(State, ok)
  +                     finish(State, ok)
                end,
       {noreply, State2#state{txstatus = Status}};
   
   on_message(Error = {error, _}, State) ->
       State2 = case command_tag(State) of
                    C when C == squery; C == equery ->
  -                     add_result(State, Error);
  +                     add_result(State, Error, Error);
                    _ ->
  -                     sync_required(reply(State, Error))
  +                     sync_required(finish(State, Error))
                end,
       {noreply, State2};
   
  
positive.code: on_message({$n, <<>>}, State) ->
      State2 = case command_tag(State) of
                   C when C == parse; C == describe_statement ->
                       reply(State, {ok, make_statement(State)});
                   describe_portal ->
                       reply(State, {ok, []})
               end,
      {noreply, State2};
  
  
negative.code:         8 -> Method = sspi;
          _ -> Method = unknown
      end,
      State2 = finish(State, {error, {unsupported_auth_method, Method}}),
      {stop, normal, State2};
  
  %% ErrorResponse
  