Browse Source

sync after parse error

Anton Lebedevich 13 years ago
parent
commit
ee1c9cd4d4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/pgsql.erl

+ 2 - 0
src/pgsql.erl

@@ -56,6 +56,8 @@ equery(C, Sql, Parameters) ->
             Ref = pgsql_sock:equery(C, S, Typed_Parameters),
             Ref = pgsql_sock:equery(C, S, Typed_Parameters),
             receive_result(C, Ref, undefined);
             receive_result(C, Ref, undefined);
         Error ->
         Error ->
+            Ref = pgsql_sock:sync(C),
+            receive_atom(C, Ref, done, ok),
             Error
             Error
     end.
     end.