anchor.diff:  -include("pgsql.hrl").
   -include("pgsql_binary.hrl").
   
  --record(state, {mod, sock, tail, backend}).
  +-record(state, {mod, sock, tail, backend, on_message}).
   
   %% -- client interface --
   
  
positive.code: handle_info({_, _Sock, Data}, #state{tail = Tail} = State) ->
      on_tail(State#state{tail = <<Tail/binary, Data/binary>>}.
  
  on_tail(#state{tail = Tail} = State) ->
      case pgsql_wire:decode_message(Tail) of
          {Message, Tail2} ->
              on_tail(on_message(Message, State#{tail = Tail2}));
          _ ->
              {noreply, State}
      end.
  
negative.code:     end,
      send([<<196608:?int32>>, Opts3, 0], State2),
  %% TODO    Async   = proplists:get_value(async, Opts, undefined),
      setopts(State2, [{active, true}]),
      {ok,
       State2#state{on_message = fun(M, S) -> auth(User, Password, M, S) end},
       Timeout}.
  
  handle_call(Call, _From, State) ->
      {stop, {unsupported_call, Call}, State}.
  