that should work fine, add "echo=True" to your create_engine() call and it will show you all the SQL being issued.
On Sep 4, 2006, at 10:03 AM, Enrico Morelli wrote: > Another question, > > why when I try to use engine.execute() to alter a table nothing > happens? >> From a program that I'm writing doesn't works, so I had try by >> hand from > a python shell, but nothing happen also. > > from sqlalchemy import * > > engine=create_engine('postgres://[EMAIL PROTECTED]/NMR2') > metadata=BoundMetaData(engine) > session=create_session() > t='mytable' > c='mycolumn' > engine.execute('ALTER TABLE %s ADD COLUMN %s VARCHAR(50)' % (t, c)) > > > I use psql to see the result, but nothing happen. > > Excuse me for this stupid question but I'm unable to solve it. > > > -- > ------------------------------------------------------------------- > (o_ > (o_ //\ Coltivate Linux che tanto Windows si pianta da solo. > (/)_ V_/_ > +------------------------------------------------------------------+ > | ENRICO MORELLI | email: [EMAIL PROTECTED] | > | * * * * | phone: +39 055 4574269 | > | University of Florence | fax : +39 055 4574253 | > | CERM - via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY | > +------------------------------------------------------------------+ > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlalchemy-users mailing list > Sqlalchemy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users