Hey,
I use Django and just dropped and re-created database in order to flush table data. Now when I'm trying to do any db-related task, I get:
./manage.py sql portfolio
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py", line 362, in execute_manager
utility.execute()
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py", line 303, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 222, in execute
output = self.handle(*args, **options)
File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 286, in handle
app_output = self.handle_app(app, **options)
File "/usr/lib/pymodules/python2.6/django/core/management/commands/sql.py", line 10, in handle_app
return u'\n'.join(sql_create(app, self.style)).encode('utf-8')
File "/usr/lib/pymodules/python2.6/django/core/management/sql.py", line 28, in sql_create
tables = connection.introspection.table_names()
File "/usr/lib/pymodules/python2.6/django/db/backends/__init__.py", line 491, in table_names
return self.get_table_list(cursor)
File "/usr/lib/pymodules/python2.6/django/db/backends/postgresql/introspection.py", line 30, in get_table_list
AND pg_catalog.pg_table_is_visible(c.oid)""")
File "/usr/lib/pymodules/python2.6/django/db/backends/util.py", line 19, in execute
return self.cursor.execute(sql, params)
psycopg2.InternalError: BŁĄD: current transaction is aborted, commands ignored until end of transaction block
As you can see it's just code generation, so there should not be any problem with transaction. What's going on? :-(