#2417: Support for binary type fields (aka: bytea in postgres and VARBINARY in
mysql)
------------------------------------------+---------------------------------
          Reporter:  [EMAIL PROTECTED]  |         Owner:  nobody
            Status:  assigned             |     Milestone:        
         Component:  Database wrapper     |       Version:        
        Resolution:                       |      Keywords:        
             Stage:  Accepted             |     Has_patch:  1     
        Needs_docs:  0                    |   Needs_tests:  1     
Needs_better_patch:  0                    |  
------------------------------------------+---------------------------------
Comment (by [EMAIL PROTECTED]):

 > Thanks for looking at the "make it work across all databases" aspect of
 this

 We also plan to install Oracle (may be) and try to test it with it.

 > I like the use of buffer(), although just using a bytestring (Python's
 str type) would have
 > worked to.

 buffer() has been used by performance reasons, PostgreSQL and SQLite
 already return it (and psycopg2 developers mention that its a way faster
 of using str here).

 > it feels messy to have to test for certain field types in Model.__init__

 Agree. We have found better solution, by using MySQL converters. Other
 database backends don't require any conversion.

 > Using repr(v) instead of simply v in the backends

 This conversion was only applied when DEBUG=True and some SQL error raise.
 Since binary data can be quite large, we have decided to print only
 indication that binary data is passed, and size of it. May be thats not
 ideal, but to understand problem in SQL should be enough.

 Alex & Vic @ halogen-dg.com

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2417#comment:45>
Django Code <http://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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to