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

[WIP] Adds ltree string type #382

Merged
merged 2 commits into from
Oct 25, 2022
Merged

[WIP] Adds ltree string type #382

merged 2 commits into from
Oct 25, 2022

Conversation

auyer
Copy link
Contributor

@auyer auyer commented Oct 24, 2022

This adds ltree type as a string, using commit as guide 9ae1ecb.
ltree is available in the driver since sfackler/rust-postgres#389
Works with all protocols, but has an issue with Binary:

image

When I inspect the data in the shell, the dataframe that came from Postgres shows this hex prefix.
image

I'm looking for help delivering this, and other Postgres Types. Thanks!
Fixes: #381

@wangxiaoying
Copy link
Contributor

Hi @auyer , thanks for the PR and it looks great!

For the error, I tried to print output value from rust-postgres directly and it shows the return value using copy_out with BINARY has this single hex char prefix for ltree type:

image

which does not happen in copy_our with CSV or query_raw in rust-postgres:

image

I think this is an issue from rust-postgres, and we can report this to them. In the meanwhile, we can remove this ltree type test from test_postgres_types_binary for now and add a comment in our document of the postgres type mapping (which corresponds to the markdown file at /docs/databases/postgres.md#postgres-pandas-type-mapping).

@auyer
Copy link
Contributor Author

auyer commented Oct 24, 2022

Sounds great !
I will open the issue there and make the changes to this PR.
Tomorrow I plan to start work on Arrays ! Any advice is welcome 😁

@auyer auyer marked this pull request as ready for review October 24, 2022 23:49
@wangxiaoying wangxiaoying merged commit 6e6c04a into sfu-db:main Oct 25, 2022
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

Successfully merging this pull request may close these issues.

Support for Postgres type ltree
2 participants