On May 28, 2007, at 8:33 PM, dvd wrote:
> > > > On May 28, 10:49 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: >> On May 28, 2007, at 11:57 AM, dvd wrote: >> >> >> >>> If temporary tables are useful for other people, I can write an >>> acceptable patch >>> to the Table/Engine code (currently I don't even know whether >>> temporary tables are >>> supported by all the DBMSes). >> >> this is fine, i would add the flag "temporary=True" to Table, and >> ensure that all supporting dialects do whats required (we like to get >> at least postgres, mysql, and oracle for things like this to start >> with, maybe MS-SQL too). Mysql uses "CREATE TEMPORARY TABLE", for >> example. >> >> Reading MySQL's docs, it would appear that a "temporary" table is >> local to a single connection. So explicit Connection objects would >> have to be used with such a table to ensure that the same underlying >> DBAPI connection gets used the whole time. > > Postgres works in the same manners. > > Ok, I start to work on a small patch, in the meanwhile there is a way > to obtain the create statement from a Table object? > theres a "mock" strategy that works for schema create/drop statements specifically: buf = StringIO.StringIO() def foo(s, p=None): buf.write(s) engine = create_engine("postgres://", strategy="mock", executor=foo) metadata.create_all(connectable=engine) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---