On Tuesday, January 8, 2013 9:58:22 AM UTC-8, Rodrigo Rosenfeld Rosas wrote:
>
>  I was also thinking about another approach. Using an "after_connect" proc 
> to set the search_path to the one set by a thread local variable if one is 
> set. That way I don't need to always use the same connection. It would also 
> be much simpler to implement and wouldn't have much drawbacks, right?
>

after_connect is only called when the connection is originally created, not 
every time the connection is checked out.  So I don't think that would work.

You don't want to run a query every time the connection is checked out if 
you can avoid it, unless you are manually controlling the connection 
checkouts, as otherwise it can hurt performance.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/8bmcVnOD9SQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to