-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Holistic approach to database collations #19866
Comments
Also see high-level collations issue #19866 |
@ajcvickers this is #19866 |
Circular references. |
Stack overflow. |
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). |
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). |
@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). |
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.
Related:
The text was updated successfully, but these errors were encountered: