#26120: Make HStoreField cast its key/values to strings
--------------------------------------+------------------------------------
     Reporter:  CGenie                |                    Owner:
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.postgres      |                  Version:  1.8
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by charettes):

 Replying to [comment:6 CGenie]:
 > PostgreSQL supports arbitrary `hstore` values. Casting values to strings
 is a bad idea imho. Since the `HStoreField` is added to expose PostgreSQL-
 specific functionality, it should be supported fully, not partially with
 hacks around Python code. Especially that setting values one by one works
 fine.

 PostgreSQL will cast values to `text`
 [http://www.postgresql.org/docs/current/static/hstore.html#HSTORE anyway]:

 > This module implements the hstore data type for storing sets of
 key/value pairs within a single PostgreSQL value. This can be useful in
 various scenarios, such as rows with many attributes that are rarely
 examined, or semi-structured data. Keys and values are simply text
 strings.

--
Ticket URL: <https://code.djangoproject.com/ticket/26120#comment:7>
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/064.d94b10dc099e8e18682b1ae35acd25f5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to