On Sep 12, 2014, at 12:26 PM, Matthijs Blaas <[email protected]> wrote:

> > set the search path within the connection pool using the "connect" event; 
> > all connections used by the pool will then have this search path setting 
> > the moment they connect. Don't ever put multiple SQL expressions in a DBAPI 
> > execute (for this very reason - driver changes, hilarity ensues. We are 
> > having a crisis in Openstack right now because they made the same mistake).
> Thanks, i'll update our code to use the NullPool's connect event.
>  
> > no part of your code should be changing search_path - I'd grep for it. 
>  
> I did and made sure there is only one place where it's set. But i have good 
> hopes the connect event takes care of it, i haven't been able to reproduce 
> the error anymore.
>  
> I'm curious though, i was under the impression that when you start every 
> request in a transaction (pyramid_tm in this case), and set the search_path 
> on every transaction (using the sessions after_begin event), is it even 
> possible that a new connection is triggered somewhere that isn't included in 
> the main transaction?


SQLAlchemy never does that but I don't know what you'd be doing in your code, 
it's certainly a pattern that is supported and possible, just wouldn't happen 
implicitly.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to