#5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which
can cause interference if Django is not the only component using psycopg2
-------------------------------------------------------+--------------------
          Reporter:  Chris Wagner <[email protected]>  |         Owner:  nobody
            Status:  closed                            |     Milestone:        
         Component:  Database layer (models, ORM)      |       Version:  SVN   
        Resolution:  wontfix                           |      Keywords:        
             Stage:  Design decision needed            |     Has_patch:  0     
        Needs_docs:  0                                 |   Needs_tests:  0     
Needs_better_patch:  0                                 |  
-------------------------------------------------------+--------------------
Comment (by mhart):

 My apologies for raising a zombie of a bug, this issue has recently bitten
 us and I was hoping it could be revisited since psycopg2's register_type
 function can register a type globally (as has been done earlier) or at the
 connection or cursor level by passing a second argument for scope. Perhaps
 this is a change to psycopg2 since this bug was closed.

 http://initd.org/psycopg/docs/extensions.html#database-types-casting-
 functions

 """psycopg2.extensions.register_type(obj[, scope])

     Register a type caster created using new_type().

     If scope is specified, it should be a connection or a cursor: the type
 caster will be effective only limited to the specified object. Otherwise
 it will be globally registered."""

 I believe this would appease all parties concerned.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5171#comment:11>
Django <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