#17473: Add like and ilike lookups
-------------------------------------+-------------------------------------
     Reporter:  pmartin              |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Design
     Keywords:                       |  decision needed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by russellm):

 * stage:  Unreviewed => Design decision needed


Comment:

 On the whole, I'm not convinced that this proposal is beneficial.

 I'm not sure I agree that LIKE syntax is more readable. Regular
 expressions are a more powerful search syntax, and they are a syntax that
 is familiar in many other contexts. In contrast, LIKE syntax has limited
 capabilities, and is available only in SQL. In addition, Django's ORM
 tries to be avoid exposing SQL-specific features as much as possible, and
 LIKE syntax is about as SQL specific as you can get.

 I'd also need to see evidence that a LIKE query is faster than the
 analogous regex-based query, for all databases. There is evidently
 [http://thingsilearn.wordpress.com/2008/02/28/mysql-query-speed-regexp-vs-
 like/ a big difference under MySQL], but the same apparently
 [http://archives.postgresql.org/pgsql-sql/2000-05/msg00057.php can't be
 said about Postgres]. Personally, I'm not inclined to add a feature
 duplicating existing functionality just to work around deficiencies in
 MySQL's indexing mechanisms.

 Marking Design Decision Needed because I'm not *fundamentally* opposed to
 the idea; however, unless someone from the core is particularly enamoured
 with the idea, I think it's a wontfix.

 As an aside, I *would* be in favour of anything that would make it easier
 for you to add this filter clause as a third party extension. It *can* be
 done right now, but it should be much easier to drop in custom query
 clauses.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17473#comment:2>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to