You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using earthdistance module for querying users by coordinates, and I'm getting this error when passing String. If I convert input to float or integer myself and query, then all is good. Here is the log:
Request: GET /users/nearby?longitude=42.6&latitude=12.3
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in Postgrex.Extensions.Binary.encode/4
(postgrex) lib/postgrex/extensions/binary.ex:59: Postgrex.Extensions.Binary.encode(%Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "float8in", oid: 701, output: "float8out", receive: "float8recv", send: "float8send", type: "float8"}, "12.3", 901179, {9, 4, 5})
I wanted to fix this myself, and send PR, but not that good in binary << :: :D >> stuff yet, sorry 😄
The text was updated successfully, but these errors were encountered:
It is not about a missing encoder. You are sending a string to a float or integer column, then Postgres is giving up because it doesn't know how you would parse that. I believe converting it to integer or float is the way to go. :)
Hello, I'm using earthdistance module for querying users by coordinates, and I'm getting this error when passing
String
. If I convert input tofloat
orinteger
myself and query, then all is good. Here is the log:I wanted to fix this myself, and send PR, but not that good in binary
<< :: :D >>
stuff yet, sorry 😄The text was updated successfully, but these errors were encountered: