Closed xtian closed 5 years ago
CiString ,which is what CiText converts to, calls to_lowercase() when instantiated to not have to call to_lowercase when doing an equality check are when creating a hash key. I'm open to suggestions and/or PRs if something could be improved upon.
But why is CiString
needed?
It's needed so that you can do case insensitive comparisons in rust. It easily converts to string if that's what you need,
Ok gotcha. It might be cool if there was a way to just use String
as the Rust type instead of the wrapper if you don't need that functionality.
What is the point to lower the string in CiText? The point to have CiText in Postgres is to have strings that looks like a regular text, but internally compared insensitively. You effectively destroyed the mission of CiText.
Why is this done? Isn't the point of the
CITEXT
type that the DB backend handles this?