-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feature request: Expose ~ operator for Ltree #2064
Comments
One problem with this operator is that it uses the same symbol as regex and we refrained from exposing that in the past: #539 (comment) Maybe there's a way to namespace the ltree |
Now that #2237 brings support for regex(hence @bolerodan Perhaps you could to try one of the binaries here(bottom of the page)? |
@steve-chavez just tested it out with the new How I tested it? Used the example setup from the official Postgresql documentation https://www.postgresql.org/docs/current/ltree.html
Query used
results returned
Which matches the output from the PostgreSQL documentation linked above. Didn't try the other exposed operator as it does not apply to Ltree. |
Nice 🎉 ! So we'd need a test to ensure this one is supported and then we can close. |
Right now, one can use
cs
andcd
postgREST filters to work with the@>
and@>
operators, which also work for Ltree columns.However Ltree has another operator type using
~
to allow one to query Ltree column against an LQueryFor example in SQL
this query
which will match any label path containing foo
Thus the postgREST filter would be like
Not sure how one would name this on the PostgREST side so I left it with a placeholder of
<new_operator>
Postgresql docs for reference
https://www.postgresql.org/docs/current/ltree.html
The text was updated successfully, but these errors were encountered: