[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9898 - trunk/gnue-common/src/datasources/drivers/sql/postgresql
From: |
reinhard |
Subject: |
[gnue] r9898 - trunk/gnue-common/src/datasources/drivers/sql/postgresql |
Date: |
Thu, 13 Nov 2008 14:03:00 -0600 (CST) |
Author: reinhard
Date: 2008-11-13 14:03:00 -0600 (Thu, 13 Nov 2008)
New Revision: 9898
Modified:
trunk/gnue-common/src/datasources/drivers/sql/postgresql/Behavior.py
Log:
CREATE DATABASE may not be in a block with other statements.
Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/Behavior.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/postgresql/Behavior.py
2008-10-26 18:05:00 UTC (rev 9897)
+++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/Behavior.py
2008-11-13 20:03:00 UTC (rev 9898)
@@ -118,10 +118,12 @@
self.__connection.sql0 (cmd)
self.__connection.commit ()
+ # Cancel transaction, create database must be outside transaction
+ self.__connection.sql0 ("ABORT")
+
# Now go and create that new database
- cmd = "ABORT; CREATE DATABASE %s WITH OWNER %s ENCODING = 'UNICODE';
BEGIN"
+ cmd = "CREATE DATABASE %s WITH OWNER %s ENCODING = 'UNICODE'"
self.__connection.sql0 (cmd % (dbname, owner))
- self.__connection.commit ()
self.__connection.close ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9898 - trunk/gnue-common/src/datasources/drivers/sql/postgresql,
reinhard <=