Hi Jacob, I agree that this is documented behavior for PostgreSQL _transactions_.
The reason that I think it's a bug is that I shouldn't be in a transaction at all - as I understand http://docs.djangoproject.com/en/dev/topics/db/transactions/ , the default behaviour should be auto-commit in which each individual change is committed independently and individually, and there is no transaction taking place. This is what I see from MySQL InnoDB. My problem is that I can't get this auto-commit behavior from PostgreSQL with Django - either in the default mode or even when I explicitly use TransactionMiddleware with the @transaction.autocommit decorator or set DISABLE_TRANSACTION_MANAGEMENT to True. My suggestion is that changing the psycopg isolation level to zero (as per ticket 3460) will give true auto-commit behaviour for PostgreSQL, since otherwise psycopg wraps the Django SQL in a transaction block. Note both psycopg1 and psycopg2 both provide an explicit function to switch them into autocommit mode by setting the isolation level to zero (search for 'autocommit' in http://www.initd.org/svn/psycopg/psycopg2/trunk/lib/psycopg1.py and http://www.initd.org/svn/psycopg/psycopg1/trunk/connection.c respectively). Cheers, Richard. On Sep 20, 12:12 am, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> wrote: > Hi Richard -- > > What you've described is documented behavior for PostgreSQL (try > googling for "commands ignored until end of transaction block") -- > Postgres does not allow *any* commands in a transaction after a > database error; you have to commit or rollback first. > > Jacob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
