sqlx
sqlx copied to clipboard
ltree support is very incomplete
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)