[sqlalchemy] Re: Oracle timestamp and postgres datetime compatibility

2009-12-04 Thread Nicola Lacquaniti
Indeed was a fault of mine. I haven't noticed that, in my code, before assigning the value I converted the datetime.datetime.now() to string. So the backend tries to assign a string, and not a date. With postgres it dosn't matter (if the client and the server has the same localization...) because

Re: [sqlalchemy] how to change a database

2009-12-04 Thread Alex Brasetvik
On Dec 3, 2009, at 13:37 , Peter wrote: Lets suppose I created an engine on database 'foo' and I want to create a database 'bar' and then do my work on 'bar'. What is the recommended way to do this ? Establish a new connection to bar. -- Alex Brasetvik -- You received this message

Re: [sqlalchemy] how to change a database

2009-12-04 Thread Peter
chaouche yacine wrote: Why not create a different engine for that database ? --- On Thu, 12/3/09, Peter vm...@mycircuit.org wrote: Thanks a lot, I guess I still have to abstract away my standard sql behavior .. Peter -- You received this message because you are subscribed to the Google

[sqlalchemy] Re: how to change a database

2009-12-04 Thread chris e
As far as the creation I'm no help, but I have done something similar by connecting to different schemas in oracle. By setting the schema argument on your table objects, you can bind them to a particular database(schema), by changing the value of the schema argument, you can switch from one

Re: [sqlalchemy] FlushError: instance is in unsaved, pending instance...

2009-12-04 Thread Alessandro Dentella
Is the only solution to attach an instance (u.job = myjob) or is there another solution that doesn't require me to build the instance? if you want SQLA's delete-orphan capability, that's the only way. If you want to rely upon CASCADE rules in your DB to handle it instead, that's

Re: [sqlalchemy] FlushError: instance is in unsaved, pending instance...

2009-12-04 Thread Michael Bayer
On Dec 4, 2009, at 1:18 PM, Alessandro Dentella wrote: Is the only solution to attach an instance (u.job = myjob) or is there another solution that doesn't require me to build the instance? if you want SQLA's delete-orphan capability, that's the only way. If you want to rely upon CASCADE

Re: [sqlalchemy] FlushError: instance is in unsaved, pending instance...

2009-12-04 Thread Alessandro Dentella
On Fri, Dec 04, 2009 at 01:27:46PM -0500, Michael Bayer wrote: On Dec 4, 2009, at 1:18 PM, Alessandro Dentella wrote: Is the only solution to attach an instance (u.job = myjob) or is there another solution that doesn't require me to build the instance? if you want SQLA's

Re: [sqlalchemy] FlushError: instance is in unsaved, pending instance...

2009-12-04 Thread Michael Bayer
On Dec 4, 2009, at 2:20 PM, Alessandro Dentella wrote: On Fri, Dec 04, 2009 at 01:27:46PM -0500, Michael Bayer wrote: On Dec 4, 2009, at 1:18 PM, Alessandro Dentella wrote: Is the only solution to attach an instance (u.job = myjob) or is there another solution that doesn't require me to

[sqlalchemy] pyodbc ini file

2009-12-04 Thread Bo Shi
Hi All - I'm playing around with pyodbc (using unixodbc) support in trunk - I was wondering if there is any way to bypass the additional system-wide odbc.ini settings file to create connections. Is there a way to simply pass in all the connection parameters via create_engine(...) that would