Hello.

Setup:
  python 2.7.6
  postgres 9.3.4
  sqlalchemy 0.9.4 (also, 0.8.4)
  pg8000 1.9.8

I am attempting to create a database using sqlalchemy with the above tools 
and the following code:

from sqlalchemy import create_engine

dburl = "postgresql+pg8000://user:pas...@db.foo.com:5432/postgres"

engine = create_engine(dburl)

conn = engine.connect()
conn.execute("COMMIT")
conn.execute("CREATE DATABASE qux")
conn.close()

but I receive the following error:

sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('ERROR', '25001', 
'CREATE DATABASE cannot run inside a transaction block') 'CREATE DATABASE 
qux' ()

However, running the same code against the same database but using 
sqlalchemy version 0.8.0 works.

Is there something I can do to get 0.9.4 to work for me?

-mc

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to