pypgsql 'create database' problem - Mailing list pgsql-general

From rdacker@pacbell.net (rdack)
Subject pypgsql 'create database' problem
Date
Msg-id 644f6688.0110011048.51982136@posting.google.com
Whole thread Raw
List pgsql-general
from python using PgSQL.
i get:
" libpq.OperationalError: ERROR:  CREATE DATABASE: may not be called
in a transaction block"

in a python script i do :
db = PgSQL.connect(database='template1')
cur=db.cursor()
cur.execute("create database tt2")
cur.close()
del db, cur

how does one not be in a transaction block?
what is the correct way to create a db?

pgsql-general by date:

Previous
From: "Your Name"
Date:
Subject: PostgreSQL: To Use Or Not To Use?
Next
From: peace_flower
Date:
Subject: Elephant, Horse and Hare (Rabbit) : Oracle, PostgreSQL and MySQL !