anchor.diff:  
   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.
  +    sync_on_error(C, receive_describe(C, Ref, #statement{name = Name})).
   
   %% bind
   
  
positive.code: 
  %% statement/portal functions
  
  describe(C, Statement = #statement{name = Name}) ->
      Ref = pgsql_sock:describe(C, statement, Name),
      receive_describe(C, Ref, Statement).
  
  describe(C, statement, Name) ->
      Ref = pgsql_sock:describe(C, statement, Name),
      receive_describe(C, Ref, #statement{name = Name});
  
  describe(C, Type, Name) ->
      %% TODO unknown result format of Describe portal
  
negative.code:         {'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.
  
  