Skip to content
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

Closed
4 of 7 tasks
ajcvickers opened this issue Feb 10, 2020 · 7 comments
Closed
4 of 7 tasks

Holistic approach to database collations #19866

ajcvickers opened this issue Feb 10, 2020 · 7 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@ajcvickers
Copy link
Contributor

ajcvickers commented Feb 10, 2020

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:

@ajcvickers
Copy link
Contributor Author

Also see high-level collations issue #19866

@roji
Copy link
Member

roji commented Feb 10, 2020

@ajcvickers this is #19866 :trollface:

@smitpatel
Copy link
Contributor

Circular references.

@ajcvickers
Copy link
Contributor Author

Stack overflow.

@roji
Copy link
Member

roji commented 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
Copy link
Member

roji commented 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
Copy link
Member

roji commented 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).

@roji roji removed this from the Backlog milestone May 1, 2020
@ajcvickers ajcvickers added this to the 5.0.0 milestone May 4, 2020
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label May 4, 2020
@ajcvickers ajcvickers removed this from the 5.0.0 milestone May 11, 2020
@ajcvickers ajcvickers added this to the 5.0.0-preview5 milestone May 11, 2020
@bricelam bricelam removed their assignment Jul 26, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-preview5, 5.0.0 Nov 7, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants