Wolodja Wentland wrote: > > def create(self): > """Create this database""" > # set isolation level to AUTOCOMMIT > # postgres can't CREATE databases within a transaction > self._admin_engine.connect().connection.connection.set_isolation_level( > ISOLATION_LEVEL_AUTOCOMMIT) > > self.admin_session.execute('CREATE DATABASE %s'%(self.name))
there's nothing about the above code that guarantees the connection on which you called set_isolation_level() is the one used by your session.execute(). I think you mean to call execute("CREATE DATABASE") on the connection returned by self._admin_engine.connect(). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---