Re: [sqlalchemy] Execute statement after each connect.

2012-05-15 Thread Oliver Tonnhofer
Hi Simon, On Mon, May 14, 2012 at 7:26 PM, Simon King si...@simonking.org.uk wrote:  http://docs.sqlalchemy.org/en/rel_0_7/core/events.html#sqlalchemy.events.PoolEvents.connect 'connect' event handlers look like this:  connect(dbapi_connection, connection_record) Can't you use the

[sqlalchemy] Execute statement after each connect.

2012-05-14 Thread Oliver Tonnhofer
Hi, how can I execute a statement for each new connection. I'm using the trigram module (pg_trgm) for PostgreSQL and I need to set a threshold by calling an SQL function for each new connection (`select set_limit(0.5);`). I'm using the expression API and `engine.execute`. I looked at the event

Re: [sqlalchemy] Execute statement after each connect.

2012-05-14 Thread Simon King
On Mon, May 14, 2012 at 5:20 PM, Oliver Tonnhofer olt...@gmail.com wrote: Hi, how can I execute a statement for each new connection. I'm using the trigram module (pg_trgm) for PostgreSQL and I need to set a threshold by calling an SQL function for each new connection (`select