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

[Postgres] Add support for ltree #196

Closed
mehcode opened this issue Mar 30, 2020 · 3 comments · Fixed by #1696
Closed

[Postgres] Add support for ltree #196

mehcode opened this issue Mar 30, 2020 · 3 comments · Fixed by #1696
Labels
db:postgres Related to PostgreSQL E-medium enhancement New feature or request

Comments

@mehcode
Copy link
Member

mehcode commented Mar 30, 2020

https://www.postgresql.org/docs/current/ltree.html


@mehcode mehcode added enhancement New feature or request db:postgres Related to PostgreSQL E-medium labels Mar 30, 2020
@greglearns
Copy link

Postgres just committed support for binary format, but it is not released yet: https://commitfest.postgresql.org/24/2242/. In the mean time, you can (easily?) treat ltrees as TEXT which does work over the binary channel using select ltree2text(my_tree) and insert via insert int my_table (my_tree) values ($1::text::ltree).

@mehcode
Copy link
Member Author

mehcode commented May 1, 2020

You don't need the casts if we implement it correctly. In other words, when I say text format I don't mean the text data type.

Good to see binary support being added. We support 9.6+ at the moment so we could only send in binary if we detect the server version or something.

@jlgerber
Copy link

With Postgresql 13.0, it looks like binary support for ltree has landed:

Add support for binary I/O of ltree, lquery, and ltxtquery types (Nino Floris)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
db:postgres Related to PostgreSQL E-medium enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants