-
Notifications
You must be signed in to change notification settings - Fork 228
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
StartsWith on citext column does not return results #319
Comments
I'll take a look at this. Can you please say which version you're using? |
Sorry, I meant to include that and forgot. I'm using version 2.0.1 (the latest) and running 10.1 of PostgreSQL. |
Your analysis is correct. PostgreSQL's I pushed a commit that will specifically check for citext and cast the result of |
This appears to have regressed in 3.1 |
I am having an issue trying to do a StartsWith() on a "citext" column. When the case of the search value doesn't match the data, I don't get the correct results returned.
The condition that is being generated is something like this
The problem seems to be caused by the LEFT/LENGTH part. LEFT seems to be returning the value as a normal "text" string and not a "citext" value so it's not doing a case insensitive comparison.
In my searches, I came across this discussion which I assume is why that condition was added.
I can workaround it with a .ToLower() on the column but that defeats the purpose of the citext. Can anything be done about this?
The text was updated successfully, but these errors were encountered: