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

ltree support is very incomplete #3229

Open
anarchodin opened this issue May 13, 2024 · 0 comments
Open

ltree support is very incomplete #3229

anarchodin opened this issue May 13, 2024 · 0 comments
Labels

Comments

@anarchodin
Copy link

Bug Description

PgLTreeLabel is too strict in its validity check: it permits only ASCII alphanumeric and underscore. The ltree extension in PostgreSQL is locale-sensitive, and therefore has a decidedly wider range of allowed characters than this.

It may also be worth noting that with PostgreSQL 16, hyphen was added to the list of supported characters, and the length limit was raised to 1000 codepoints (not bytes).

Minimal Reproduction

Insert non-ASCII alphanumeric characters into a label in an ltree column and attempt to select it.

Info

  • SQLx version: 0.7.4, but verified present in main branch
  • SQLx features enabled: postgres, runtime-tokio-native-tls, json, time, macros
  • Database server and version: PostgreSQL only, for obvious reasons
  • Operating system: not material, but only tested on Linux
  • rustc --version: rustc 1.78.0 (9b00956e5 2024-04-29)
@anarchodin anarchodin added the bug label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant