#21553: InterfaceError in Postgres
----------------------------------------------+--------------------
     Reporter:  anonymous                     |      Owner:  nobody
         Type:  Uncategorized                 |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.6
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 I think this is a hole in the fix for #15901 -- in Postgres,
 connection.is_usable accesses the cursor directly, with the result that
 base exceptions (eg. InterfaceError) are thrown without the normal wrapper
 and thus not caught:

 {{{
     def is_usable(self):
         try:
             # Use a psycopg cursor directly, bypassing Django's utilities.
             self.connection.cursor().execute("SELECT 1")
         except DatabaseError:
             return False
         else:
             return True
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21553>
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/052.2ac464f1dc475362b47a508b8e5ef505%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to