
Hallo zusammen, ich möchte mittels Python-2.4-Programm und PgSQL eine Datenbank (Client=W2k, Server=Debian, Postgres=V7.4) löschen:
from pyPgSQL import PgSQL connection = PgSQL.connect (host="abc.abc.abc.abc", database="template1", user="postgres", password="naja") cursor = connection.cursor () cursor.execute ("DROP database household_financials")
Traceback (most recent call last): File "<pyshell#6>", line 1, in -toplevel- cursor.execute ("DROP database household_financials") File "C:\Python24\Lib\site-packages\pyPgSQL\PgSQL.py", line 3072, in execute raise OperationalError, msg OperationalError: ERROR: DROP DATABASE cannot run inside a transaction block Was kann ich noch korrigieren? connection.autocommit = False bringt auch nichts.... Vielen Dank. Gruss, Holger _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
participants (1)
-
Holger Rodriguez