#29916: Add additional Postgres lookups to gain parity with supported range
functions in Postgres
-------------------------------------+-------------------------------------
     Reporter:  Peter J. Farrell     |                    Owner:  Peter J.
                                     |  Farrell
         Type:  New feature          |                   Status:  assigned
    Component:  contrib.postgres     |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  lower_inf,           |             Triage Stage:
  upper_inf, isempty, lower_inc,     |  Unreviewed
  upper_inc                          |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Peter J. Farrell:

Old description:

> Add support for following functions for Postgres range fields that are
> currently not supported in Django:
>
> * isempty
> * lower_inc
> * upper_inc
> * lower_inf
> * upper_inf
>
> Example usage:
>
> {{{#!python
> MyObject.objects.filter(date_range__upper_inf=True)  # for infinity
> MyObject.objects.filter(date_range__upper_inf=False)  # for not infinity
> }}}
>
> Example code:
> [https://gist.github.com/peterfarrell/5c7b8d80319563813caba6320b568829]
>
> These can all be implemented as new ORM lookups for the Postgres range
> type fields so the Django ORM can gain parity with functionality
> available in Postgres range fields.

New description:

 Add support for following functions for Postgres range fields that are
 currently not supported in Django:

 * isempty
 * lower_inc
 * upper_inc
 * lower_inf
 * upper_inf

 [https://www.postgresql.org/docs/9.3/static/functions-range.html]

 Example usage:

 {{{#!python
 MyObject.objects.filter(date_range__upper_inf=True)  # for infinity
 MyObject.objects.filter(date_range__upper_inf=False)  # for not infinity
 }}}

 Example code:
 [https://gist.github.com/peterfarrell/5c7b8d80319563813caba6320b568829]

 These can all be implemented as new ORM lookups for the Postgres range
 type fields so the Django ORM can gain parity with functionality available
 in Postgres range fields.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29916#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.8123fbb105f31222ea611c7f8ab5188f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to