[Django] #31777: Custom collations

48 views
Skip to first unread message

Django

unread,
Jul 10, 2020, 5:51:50 AM7/10/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------
Reporter: Tom | Owner: nobody
Carrick |
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/31777>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 10, 2020, 11:38:23 AM7/10/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------
Reporter: Tom Carrick | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

Related to #21181, #9682, and #5745.

--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:1>

Django

unread,
Jul 14, 2020, 2:31:12 AM7/14/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: nobody
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* 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>

Django

unread,
Jul 19, 2020, 4:25:27 PM7/19/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: nobody
Type: New feature | Status: new

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin):

* 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>

Django

unread,
Jul 19, 2020, 4:25:47 PM7/19/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:4>

Django

unread,
Jul 20, 2020, 3:55:31 AM7/20/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

Super. Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:5>

Django

unread,
Jul 20, 2020, 9:30:20 AM7/20/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------
Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* owner: nobody => Tom Carrick
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:6>

Django

unread,
Jul 21, 2020, 10:02:01 AM7/21/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* 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>

Django

unread,
Jul 21, 2020, 11:41:25 AM7/21/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:8>

Django

unread,
Jul 21, 2020, 11:51:51 AM7/21/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* 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>

Django

unread,
Aug 14, 2020, 4:25:17 AM8/14/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:10>

Django

unread,
Aug 15, 2020, 5:18:52 AM8/15/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:11>

Django

unread,
Sep 8, 2020, 5:35:01 AM9/8/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:12>

Django

unread,
Sep 8, 2020, 1:51:57 PM9/8/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:13>

Django

unread,
Sep 21, 2020, 4:56:18 AM9/21/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31777#comment:14>

Django

unread,
Oct 2, 2020, 7:30:37 AM10/2/20
to django-...@googlegroups.com
#31777: Custom collations
-------------------------------------+-------------------------------------

Reporter: Tom Carrick | Owner: Tom
| Carrick
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages