#27147: Add support for defining bounds in postgres range fields
----------------------------------+-----------------------------------
     Reporter:  impala2           |      Owner:
         Type:  New feature       |     Status:  new
    Component:  contrib.postgres  |    Version:  master
     Severity:  Normal            |   Keywords:  postgres range bounds
 Triage Stage:  Unreviewed        |  Has patch:  0
Easy pickings:  0                 |      UI/UX:  0
----------------------------------+-----------------------------------
 Django supports postgres range types in the contrib package, but the
 bounds are restricted to the default value of "[)" (inclusive low value,
 exclusive high value) in psycopg2. I propose that django add support for
 all bounds types - "[]", "(]", "[)" and "()".

 Psycopg2 documentation on the matter:
 http://initd.org/psycopg/docs/extras.html?highlight=range#range-data-types
 Postgres documentation on the syntax:
 https://www.postgresql.org/docs/9.2/static/rangetypes.html#RANGETYPES-IO

 I think this could easily be implemented via another argument to the range
 field type contructor which could be passed down to the psycogp2 range
 type whenever it's created. Everything else should be automatic after
 that. Some validation is probably a good idea too.

 If people think this is a useful feature, I'll try to write a patch.

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

Reply via email to