Permalink
Browse files

Encode floats.

  • Loading branch information...
1 parent 6aa9282 commit 0f2fc3281de70e15ef9deb4afacf8b12287bb2d4 @dryfish dryfish committed Aug 18, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/pgsql_proto.erl
View
@@ -568,6 +568,11 @@ encode_message(bind, _Bind={NamePortal, NamePrepared,
(Bin) when is_binary(Bin) ->
Size = size(Bin),
<<Size:32/integer, Bin/binary>>;
+ (Float) when is_float(Float) ->
+ List = float_to_list(Float),
+ Bin = list_to_binary(List),
+ Size = size(Bin),
+ <<Size:32/integer, Bin/binary>>;
(Integer) when is_integer(Integer) ->
List = integer_to_list(Integer),
Bin = list_to_binary(List),

0 comments on commit 0f2fc32

Please sign in to comment.