anchor.diff:           exec_prepared_statement/3,
            exec_prepared_select/3]).
   
  --record(state, 
  -        {cn,
  -         statements = dict:new() :: dict(),
  -         ctrans :: dict() | undefined }).
  +-record(state,  {cn,
  +                 statements = dict:new() :: dict(),
  +                 ctrans :: dict() | undefined }).
   
  --record(prepared_statement, 
  +-record(prepared_statement,
           {name :: string(),
            input_types  :: any(),
            output_fields :: any(),
  
positive.code:             {ok, #state{cn=Connection, statements=Prepared, ctrans=CTrans}};
          {error, {syntax, Msg}} ->
              {stop, {syntax, Msg}};
          X -> ?debugVal(X),                
               {stop, X}
      end.
  
  
negative.code:     ok = pgsql:bind(Cn, Stmt, NArgs),
      %% Note: we might get partial results here for big selects!
      Rv =
          try
              case pgsql:execute(Cn, Stmt) of
                  {ok, Count} ->
                      {{ok, Count}, State};
                  Result ->
                      {{error, Result}, State}
              end
          catch
              _:X -> ?debugVal(X), ?debugVal(erlang:get_stacktrace())
          end,
      pgsql:squery(Cn, "COMMIT"),
  