anchor.diff:          {'EXIT', C, _Reason} ->
               {error, closed}
       end.
  +
  +sync_on_error(C, Error = {error, _}) ->
  +    Ref = pgsql_sock:sync(C),
  +    receive_atom(C, Ref, done, ok),
  +    Error;
  +
  +sync_on_error(_C, R) ->
  +    R.
  +
  
positive.code: 
  parse(C, Name, Sql, Types) ->
      Ref = pgsql_sock:parse(C, Name, Sql, Types),
      case receive_describe(C, Ref, #statement{name = Name}) of
          Res = {ok, _} ->
              Res;
          Error ->
              Ref2 = pgsql_sock:sync(C),
              receive_atom(C, Ref2, done, ok),
              Error
      end.
  
  %% bind
  
  
negative.code: 
  bind(C, Statement, PortalName, Parameters) ->
      Ref = pgsql_sock:bind(C, Statement, PortalName, Parameters),
      sync_on_error(C, receive_atom(C, Ref, ok, ok)).
  
  %% execute
  
  