#24767: Add GREATEST and LEAST Query Expressions
----------------------------------------------+--------------------
     Reporter:  Ian-Foote                     |      Owner:  nobody
         Type:  New feature                   |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 Postgres supports [http://www.postgresql.org/docs/current/static
 /functions-conditional.html#FUNCTIONS-GREATEST-LEAST GREATEST and LEAST]
 query expressions. These could easily be implemented in django by
 subclassing the
 
[https://github.com/django/django/blob/master/django/db/models/functions.py#L8-L29
 Coalesce] query expression and changing the `function` attribute to
 `'GREATEST'` or `'LEAST'` respectively.

 I'm not sure which other databases support this, so perhaps this can only
 be added to `contrib.postgres`.

 If this isn't appropriate for core, I'm happy to create a small PyPI
 package instead.

--
Ticket URL: <https://code.djangoproject.com/ticket/24767>
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/052.9a1b785c134711a63aabc3c40c120740%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to