Skip to content
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

Add support for postgis geometry/box2d/box3d types #1403

Open
jaclarke opened this issue Nov 19, 2024 · 2 comments
Open

Add support for postgis geometry/box2d/box3d types #1403

jaclarke opened this issue Nov 19, 2024 · 2 comments

Comments

@jaclarke
Copy link
Member

Queries returning postgis types are currently unsupported:

select <ext::postgis::geometry>'POINT (1 2 3)';
edgedb error: ProtocolEncodingError: base scalar with uuid 44c901c0-d922-4894-83c8-061bd05e4840 not found

Geometry is encoded in WKB format (https://libgeos.org/specifications/wkb/), and box2d/box3d are encoded as polygon geometry. See edgedb/edgedb-js#1113.

@msullivan
Copy link
Member

I think that probably the right way to do this is to have edgedb-rust not actually decode the WKB, but provide it to clients as bytes. This is so that we don't need to have any dependency on geometry libraries in edgedb-rust.

Then, edgedb-cli (which has a trillion deps already) can decode the WKB.

@mmastrac thoughts?

@mmastrac
Copy link
Contributor

mmastrac commented Dec 6, 2024

For now this seems reasonable -- maybe we can decode to a Wkb(Bytes) and let the caller handle it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants