Changes between Initial Version and Version 4 of Ticket #29145


Ignore:
Timestamp:
02/22/2018 10:13:00 AM (17 months ago)
Author:
Tim Graham
Comment:

Tentatively accepting, although I'm not certain about the complexity this will require. I'm thinking that whenever a value is assigned to a CI field, that value will be have to wrapped in a str subclass that implements __eq__() to do the case-insensitive comparison. I guess a perfect implementation that considers database collation, for example, may not be feasible.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29145

    • Property Type changed from Uncategorized to Cleanup/optimization
    • Property Summary changed from CIText and __eq__ to Allow CIText values to be compared as the database would compare them (case-insensitively)
    • Property Component changed from Uncategorized to contrib.postgres
    • Property Triage Stage changed from Unreviewed to Accepted
  • Ticket #29145 – Description

    initial v4  
    33Under the premise that python and postgresql use the same collation, tweak the system to compare two citext-fields in a case-insensitive manner for equality, without touching the database (as it is done for all other fields).
    44
    5 Attaching to each citext-field returned from the model an {{{__eq__}}} doing {{{.lower()}}} could help.
     5Attaching to each citext-field returned from the model an `__eq__` doing `.lower()` could help.
Back to Top