Changes between Initial Version and Version 4 of Ticket #29145


Ignore:
Timestamp:
Feb 22, 2018, 10:13:00 AM (7 years 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 Component Uncategorizedcontrib.postgres
    • Property Triage Stage UnreviewedAccepted
    • Property Summary CIText and __eq__Allow CIText values to be compared as the database would compare them (case-insensitively)
    • Property Type UncategorizedCleanup/optimization
  • 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