anchor.diff:              {{error, Result}, State}
       end.
   
  -exec_prepared_statement(Name, Args, #state{cn=Cn}=State) ->
  -    ok = pgsql:bind(Cn, Name, Args),
  +-spec exec_prepared_statement(atom(), [], any()) -> {{ok, integer()} | {error, any()}, state()}.
  +exec_prepared_statement(Name, Args, #state{cn=Cn, statements=Statements}=State) ->
  +    {_Columns, Stmt} = dict:fetch(Name, Statements),
  +    ok = pgsql:bind(Cn, Stmt, Args),
       %% Note: we might get partial results here for big selects!
  -    case pgsql:execute(Cn, Name, Args) of
  +    case pgsql:execute(Cn, Stmt, Args) of
           {ok, Count} -> 
               {{ok, Count}, State};
           Result ->
  
positive.code:             load_statements(Connection, T, dict:store(Name, {Columns, Statement}, Dict));
          Error ->
              %% TODO: Discover what errors can flow out of this, and write tests.
              Error
      end.
  
  %% Converts contents of result_packet into our "standard"
  
negative.code:          exec_prepared_select/3]).
  
  -record(state, {cn,
                  statements = dict:new() :: dict() }).
  
  -type connection() :: pid().
  -type state() :: any().
  
  start_link(Config) ->
      sqerl_client:start_link(?MODULE, Config).
  
  -spec exec_prepared_select(atom(), [], state()) -> {{ok, [[tuple()]]} | {error, any()}, state()}.
  exec_prepared_select(Name, Args, #state{cn=Cn, statements=Statements}=State) ->
      {Columns, Stmt} = dict:fetch(Name, Statements),
      ok = pgsql:bind(Cn, Stmt, Args),
      %% Note: we might get partial results here for big selects!
      case pgsql:execute(Cn, Stmt, Args) of
  