[Zope-DB] Postgres - Problem creating new databases

Charlie Clark charlie@begeistert.org
Fri, 08 Nov 2002 12:01:15 +0100

On 2002-11-08 at 11:51:05 [+0100], Andrew Veitch wrote:
> I'm trying to create new databases from Zope, using psycopg and Postgres. 
> I've tried from ZSQL methods, calling psycopg directly and by 
> os.system("createdb") but I keep getting the same error:
> ERROR: CREATE DATABASE: may not be called in a transaction block CREATE 
> If I cut the code out of my product and run it at the python prompt it 
> works fine.

You need to do this within postgresql, ie. from the command line use psql, 
log in to the database and it should work fine.