[sqlalchemy] Stored procedures and SQLAlchemy

2013-06-25 Thread pinakee biswas
Hi, We are using SQLAlchemy 0.6.5 along with pylons for our portal. We are planning to use Stored Procedures to improve upon DB access performances. Has anyone used Stored Procedures with SQLAlchemy? One way is to use execute. But we plan to map the results to an object as typically done

Re: [sqlalchemy] twophase error sqlalchemy

2013-06-25 Thread Pau Tallada
Hi! I think I've stepped on the same or similar bug. I have a software which uses zodb transactions to synchronize operations in two databases. In the end, the two databases are the same (we are using the exact same postgresql connection url for both). The software runs fine if only one instance

Re: [sqlalchemy] twophase error sqlalchemy

2013-06-25 Thread Michael Bayer
looks like a zope.transaction issue to me, or at least one where they'd have to show me how they need to use the Session. They seem to be calling upon session.transaction.prepare() directly at a time when that session.transaction is no longer associated with the parent session. You'd need to

Re: [sqlalchemy] Stored procedures and SQLAlchemy

2013-06-25 Thread Michael Bayer
you can call stored procedures using any execute() method, like engine.execute() or session.execute(), but there is no integration in the ORM to tie the persistence of objects with stored procedures. On Jun 25, 2013, at 2:31 AM, pinakee biswas pinak...@gmail.com wrote: Hi, We are using

[sqlalchemy] finding sessions with idle transactions

2013-06-25 Thread Chris Withers
Hi All, I'm sure many of us have been there with sqlalchemy and postgres transactions, especially when running tests: - something is broken/wrong with my code - the test fails - I don't get any output because something else tries to do something (cleanup, whatever) with the database and

Re: [sqlalchemy] finding sessions with idle transactions

2013-06-25 Thread Michael Bayer
you could poke around in sqlalchemy.orm.session._sessions On Jun 25, 2013, at 10:29 AM, Chris Withers ch...@simplistix.co.uk wrote: Hi All, I'm sure many of us have been there with sqlalchemy and postgres transactions, especially when running tests: - something is broken/wrong with my

[sqlalchemy] HSTORE serialize/de-serialize incorrectly handles backslashes

2013-06-25 Thread Ryan Kelly
As we're trying to convert from our own homegrown version of the HSTORE type, it seems that our tests have been broken by SQLAlchemy's handling of serialization/de-serialization for hstores containing backslashes. The current serialization behavior of SQLAlchemy will do this: {'\\a': '\\1'} =

Re: [sqlalchemy] HSTORE serialize/de-serialize incorrectly handles backslashes

2013-06-25 Thread Michael Bayer
On Jun 25, 2013, at 2:13 PM, Ryan Kelly rpkell...@gmail.com wrote: As we're trying to convert from our own homegrown version of the HSTORE type, it seems that our tests have been broken by SQLAlchemy's handling of serialization/de-serialization for hstores containing backslashes. The