Nelson wrote: > > Michael, > > Looking at some usage links on the Wiki, thanks to your original link, > brought up this: > > http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode > > which has this gem of informaton: > > from sqlalchemy.databases import postgres > - and - > coltypes = dict( (v,k) for k,v in postgres.pg2_colspecs.iteritems() ) > > which gives me the conversion I need from a Column()'s type to the > correct SQL string for the ALTER TABLE statement. I can leverage that > and make it work in my model. Thanks again.
that's not really the best way to go here. in SQLA 0.5, just do this: engine = create_engine(...) dialect = engine.dialect print mycolumn.type.dialect_impl(dialect).get_col_spec() in 0.6 it's easier: print mycolumn.type.compile(dialect) > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---