#22666: (Generic)IPAddressField index never used on PostgreSQL, inconsistent
behavior
-------------------------------------+-------------------------------------
     Reporter:  intgr                |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  1.6
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by erikr):

 Replying to [comment:2 intgr]:
 > Uh, so subclasses of GenericIPAddressField with a different name don't
 inherit its behavior? :( It seems we're adding hacks on top of hacks.

 No, it depends on the return value of `get_internal_type()` of the field.

 > Maybe this illustrates better the behavior I am talking about: ...

 And along with `__gte` and `__lt`, this would also change for exact
 matches, right? The way forward you suggest makes sense to me then.

 There is a minor backwards compatibility issue, as of course the behaviour
 of `__gte` and friends will have changed. However, its current behaviour
 with textual sorting doesn't make much sense, so I doubt this is an issue
 for anyone. It does warrant a mention in the release notes.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.330b7654f60ecbd6e67d7824adefc120%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to