dialect/sql: escape EqualFold on Postgres #2860
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello π,
EqualFoldcurrently does not escape the argument, this can lead to problems, like returning multiple results when the first/last character of the argument is%andpq: LIKE pattern must not end with escape characterwhen the first/last character of the argument is a escape character.While at it, I revised the points raised on #1484 (from the Postgres point of view). There seems to be a lot of different information about the use of
ILIKEvsLOWERand I could not reach a conclusion.I think we just leave as is but we should keep in mind that may exists a faster way available, when we have a user that needs it, we could look at it again.