anchor.diff:      {stop, {sock_error, Reason}, State};
   
   handle_info({_, _Sock, Data}, #state{tail = Tail} = State) ->
  -    on_tail(State#state{tail = <<Tail/binary, Data/binary>>}.
  +    on_tail(State#state{tail = <<Tail/binary, Data/binary>>}).
   
   on_tail(#state{tail = Tail, on_message = OnMessage} = State) ->
       case pgsql_wire:decode_message(Tail) of
           {Message, Tail2} ->
  -            on_tail(OnMessage(Message, State#{tail = Tail2}));
  +            on_tail(OnMessage(Message, State#state{tail = Tail2}));
           _ ->
               {noreply, State}
       end.
  
positive.code: 
  %% -- internal functions --
  
  start_ssl($S, _Flag, Opts, State) ->
      #state{sock = S1, timeout = Timeout} = State,
      case ssl:connect(S1, Opts, Timeout) of
          {ok, S2}        -> State#state{mod = ssl, sock = S2};
          {error, Reason} -> exit({ssl_negotiation_failed, Reason})
      end;
  
  start_ssl($N, Flag, _Opts, State) ->
      case Flag of
          true     -> State;
          required -> exit(ssl_not_available)
      end.
  
  setopts(#state{mod = Mod, sock = Sock}, Opts) ->
  
negative.code: 
  on_message({$E, Data}, State) ->
      %% TODO use it
      {error, pgsql_wire:decode_error(Data)},
      State;
  
  on_message({$A, <<Pid:?int32, Strings/binary>>}, State) ->
  