Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCorrect way to interpret row data when implementing custom postgres types? #1832
Comments
This comment has been minimized.
Boscop
commented
Sep 2, 2018
|
Ah, I shouldn't reverse the byte order.. But now the question arises, what's the correct way to serialize geography points? Is it valid to write geography points as EWKB in any expression? such as in insert statements, or as argument to functions like |
This comment has been minimized.
|
I don't know the exact representation of every postgres type in libpq. This would be a better question for the libpq/postgis folks. I close this issue because this is nothing actionable for diesel itself. (The representation is something that is defined by libpq/postgis) |
Boscop commentedSep 2, 2018
What is the correct way to interpret row data when implementing custom postgres types?
Diesel seems to use the binary protocol but how are geography points encoded in the binary protocol?
I'm trying to figure out how to get geography points working, are my assumptions correct here?
ThinkAlexandria/diesel_geometry#7 (comment)
When I convert the first 8 bytes of the EWKB string in reversed byte order to a f64, it shows a different value than what PgPoint shows as the first coordinate..