[sqlalchemy] Re: Sequence start value not working with PostgreSQL

2009-05-11 Thread Chris Miles
Thanks Michael. On 12/05/2009, at 12:34 AM, Michael Bayer wrote: the start functionality is unimplemented at the moment. instead, issue: t = Table(mytable, ) DDL(CREATE SEQUENCE ).execute_at('before-create', t) Chris Miles wrote: I need to create an explicit Sequence

[sqlalchemy] Re: app memory leak - execute() with SA 0.5.2, PG 8.3, Psycopg2

2009-02-24 Thread Chris Miles
)? Python 2.5 and later will free up garbage collected memory, handing it back to the system. Previous versions of Python would never free up memory (hence never shrink in size). Are you using Python 2.4? Cheers, Chris Miles --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: Create tables within a transaction

2009-02-06 Thread Chris Miles
INTEGER); sqlite ROLLBACK; sqlite .tables sqlite Perhaps the behaviour I see through SA is a side effect of pysqlite? Cheers, Chris Miles On Feb 6, 2:36 pm, Michael Bayer mike...@zzzcomputing.com wrote: sqlite doesn't include CREATE TABLE statements within the scope of a   transaction.  I think

[sqlalchemy] Create tables within a transaction

2009-02-05 Thread Chris Miles
tables from SQL (sending CREATE TABLE ... strings) within the transaction then I get the desired behaviour. However, I'd prefer to use table.create() for convenience (i.e. across multiple engines). Cheers, Chris Miles --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: Create tables within a transaction

2009-02-05 Thread Chris Miles
) trans.commit() except: trans.rollback() # Cheers, Chris On Feb 6, 2:08 am, Michael Bayer mike...@zzzcomputing.com wrote: create() and create_all() take a bind argument which can be an   engine or connection.  you want the connection in this case. On Feb 5, 2009, at 5:27 AM, Chris Miles wrote

[sqlalchemy] Re: Create tables within a transaction

2009-02-05 Thread Chris Miles
Ok. I'll do some testing against other engines when I get a chance. Thanks for helping. Cheers Chris Miles On Feb 6, 2:36 pm, Michael Bayer mike...@zzzcomputing.com wrote: sqlite doesn't include CREATE TABLE statements within the scope of a   transaction.  I think that's a relatively rare

[sqlalchemy] Re: Postgres - Backup - Restore

2008-11-10 Thread Chris Miles
from 1. If you use the PostgreSQL tools pg_dump and pg_restore they should maintain the sequences properly for you when copying databases between servers. Cheers, Chris Miles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google