You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Differences in string comparison semantics in C#/.NET verses different databases has always been a a usability issue.
We decided some time ago that string comparisons that don't specify any StringComparison value will use the database semantics. This results in the most expected (and fast) queries for code written in the most common way.
One thing we want to avoid is a slow, index-missing query being generated without any explicit opt-in to this.
However, if we know the database collation, then we can potentially translate more queries with acceptable fidelity and perf, while at the same time throwing very specific messages for things we can't translate. See thread here: #1222 (comment)
This needs to involve migrations and model building as well as queries, so this issue is tracking a more holistic approach to this which covers all aspects.
Here are the docs for PostgreSQL collations. tl;dr a collation can be specified at the database level, at the column level (when creating it), or explicitly in the query on. See also this note for why handling collation as part of the type mapping doesn't seem to make sense (for PostgreSQL).
@ajcvickers I think we've done everything here that we want to do for 5.0 - the issues that remain are in the backlog and I'm not sure we need this issue to track them.
We may also consider closing #673 as we don't intend to do it (instead the decision was to point at the docs).
Activity
ajcvickers commentedon Feb 10, 2020
Also see high-level collations issue #19866
roji commentedon Feb 10, 2020
@ajcvickers this is #19866
smitpatel commentedon Feb 10, 2020
Circular references.
ajcvickers commentedon Feb 10, 2020
Stack overflow.
roji commentedon Mar 27, 2020
Here are the docs for PostgreSQL collations. tl;dr a collation can be specified at the database level, at the column level (when creating it), or explicitly in the query on. See also this note for why handling collation as part of the type mapping doesn't seem to make sense (for PostgreSQL).
roji commentedon Apr 8, 2020
Following our design discussion, here's what we plan to do for 5.0:
At the moment, we don't plan to translate any string equality/comparison which accept the StringComparison enum (#1222) - see #1222 (comment).
roji commentedon May 1, 2020
@ajcvickers I think we've done everything here that we want to do for 5.0 - the issues that remain are in the backlog and I'm not sure we need this issue to track them.
We may also consider closing #673 as we don't intend to do it (instead the decision was to point at the docs).