#852: psycopg.ProgrammingError exceptions leave the connection to the DB in an
unusable state
---------------------------------------+------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Database wrapper | Version:
Severity: normal | Resolution: wontfix
Keywords: |
---------------------------------------+------------------------------------
Comment (by ubernostrum):
Please be sure to read the previous discussion; it seems clear that the
error has nothing whatsoever to do with time zones, timestamps or anything
of that sort. Here is what is actually happening:
1. A bad query is being sent, and Postgres immediately aborts the current
transaction.
2. For some reason, the exception which should be generated from the bad
query is never happening.
3. Before doing the ''next'' query, Django is executing `SET TIME ZONE`
(Django does this on pretty much every query).
4. When that happens, Postgres responds that it has stopped accepting
statements in the current transaction, because of the error back in step
1.
5. This time, for some reason, the exception actually propagates.
To reiterate once again: the error is '''not''' coming from `SET TIME
ZONE`, it's coming from whichever statement executed just ''before'' the
`SET TIME ZONE`, and because an error is getting trapped or silenced
somewhere, the original error never propagates. But after the original
error has happened, ''any'' statement other than `ROLLBACK` will generate
the "current transaction is aborted" message.
--
Ticket URL: <http://code.djangoproject.com/ticket/852#comment:>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---