We have the various CI fields on postgres, but these are
[https://www.postgresql.org/docs/12/citext.html discouraged] since pg12 in
favour of [https://www.postgresql.org/docs/12/collation.html
nondeterministic collations]. I think it'd be useful to have a way to do
this in Django, though I'm not sure what the API would look like. My
initial thought, knowing very little about the ORM, is a `Collation` class
that can be passed into a model field, but I'm not sure.
--
Ticket URL: <https://code.djangoproject.com/ticket/31777>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Simon Charette):
Related to #21181, #9682, and #5745.
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:1>
* status: new => closed
* resolution: => needsinfo
Comment:
> Mailing list, but it didn't get any responses...
Hi Tom. I feel bad saying you need to go back to the mailing list, but
without SOME proposal this isn't really actionable as it stands.
You've got Simon's attention now, so there's hope there... 🙂
Short of that, I'd suggest sketching up some ideas and following up your
initial post. (Having just looked at it, it's a bit "Argh! no idea", at
first glance.)
I'm going to close as needs info for now. Really happy to re-open either
we have some suggestions for the API, or (less good) we're happy to leave
it open even undefined, but then I'd probably want to mark it
Someday/Maybe. I hope that makes sense.
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:2>
* status: closed => new
* resolution: needsinfo =>
Comment:
Hello Carlton, given that there's a PR that looks quite reasonable and a
bit of support on the mailing list, I'm going to reopen and accept.
The ticket was short on details; the PR makes things clearer.
Essentially this is adding ORM support for a feature that most databases
support. I'm not seeing obvious drawbacks. Hence, accepting.
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:3>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:4>
Comment (by Carlton Gibson):
Super. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:5>
* owner: nobody => Tom Carrick
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:6>
* has_patch: 0 => 1
Old description:
> Mailing list, but it didn't get any responses:
> https://groups.google.com/u/2/g/django-developers/c/djMQwwxtCVY
>
> We have the various CI fields on postgres, but these are
> [https://www.postgresql.org/docs/12/citext.html discouraged] since pg12
> in favour of [https://www.postgresql.org/docs/12/collation.html
> nondeterministic collations]. I think it'd be useful to have a way to do
> this in Django, though I'm not sure what the API would look like. My
> initial thought, knowing very little about the ORM, is a `Collation`
> class that can be passed into a model field, but I'm not sure.
New description:
Mailing list, but it didn't get any responses:
https://groups.google.com/u/2/g/django-developers/c/djMQwwxtCVY
We have the various CI fields on postgres, but these are
[https://www.postgresql.org/docs/12/citext.html discouraged] since pg12 in
favour of [https://www.postgresql.org/docs/12/collation.html
nondeterministic collations]. I think it'd be useful to have a way to do
this in Django, though I'm not sure what the API would look like. My
initial thought, knowing very little about the ORM, is a `Collation` class
that can be passed into a model field, but I'm not sure.
[https://github.com/django/django/pull/13207 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:7>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:8>
* stage: Ready for checkin => Accepted
Comment:
You shouldn't mark you own PRs as ready for checkin.
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:9>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:10>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:11>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:12>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:13>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:14>
Comment (by GitHub <noreply@…>):
In [changeset:"292b3be698ef58aff9c215d62a444f66ead578c3" 292b3be6]:
{{{
#!CommitTicketReference repository=""
revision="292b3be698ef58aff9c215d62a444f66ead578c3"
Refs #31777 -- Doc'd Char/TextField.db_collation parameter in MySQL notes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:16>