-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgrex expected a binary, got %Geo.Point #70
Comments
@Virviil I'm not sure either with the information given. It may be a configuration problem. Are the two queries run in the same mix environment? Is there a simpler query you could run that shows it working or not working? |
Yep, both queries in one session of |
I can provide you any information, just don't know which |
@Virviil is that the query the Ecto runs? If so could you show me your Ecto query if possible? |
No problem. SELECT Request
INSERT Request Just populating changeset, one of the params is |
@Virviil sorry for the delayed response. I'm not sure what the issue is from looking at it. As far as I can tell from the SQL and from the Ecto query, it all looks correct. It may be a bug here, but not sure. Could also be something with Postgrex, but let's make sure first. What happens if you replace the called to |
I tried to recreate the same bug with different versions of Postgrex - and
it still appears. After that I've tried to recreate the bug on another
computer - and it doesn't appear.
After that I found workaround - manually encode the Geo.Point struct into
string with Geo.Wrk.encode. And everything works.
So, I think that the problem is with some of the deps, but I totally don't
know which one.
…On Fri, 30 Jun 2017 at 19:07 Bryan Joseph ***@***.***> wrote:
@Virviil <https://github.com/virviil> sorry for the delayed response. I'm
not sure what the issue is from looking at it. As far as I can tell from
the SQL and from the Ecto query, it all looks correct. It may be a bug
here, but not sure. Could also be something with Postgrex, but let's make
sure first. What happens if you replace the called to st_within and
st_buffer with fragments that call the underlying PostGIS functions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADzgdw87fotvfbR_B1k7rl5s2mr9NHizks5sJR02gaJpZM4N2LI6>
.
|
Glad you were able to find a workaround. When I have some time I'll try to reproduce this and if I can I'll try to fix it. |
Going to close this since there was a workaround and nothing has came up since |
This query is working:
while this one returns error:
So, I'm totally confused. It seems to me that potgrex in both cases should either work or not work - because either cast or not cast to binary.
May be I'm mising something in the configuration, or you can navigate me where should I dig deeper to see where is the problem?
The text was updated successfully, but these errors were encountered: