Re: [sqlalchemy] Database session variables with connection pooling

2015-03-09 Thread Kent
Is it safe, from within either the 'before_execute' or 'before_cursor_execute' events, to use the same connection to execute a SQL statement before the current one? I assume there is a good chance the answer is no, at least for before_cursor_execute. Why? I only want to issue the SQL to

Re: [sqlalchemy] Database session variables with connection pooling

2015-03-09 Thread Kent
Perfect, thanks much! On Saturday, March 7, 2015 at 6:38:08 PM UTC-5, Michael Bayer wrote: Kent jkent...@gmail.com javascript: wrote: I'm implementing database session variables (in Oracle, DBMS_SESSION.SET_CONTEXT(...)), in order to be able to set (from sqlalchemy) and retrieve (from

Re: [sqlalchemy] Database session variables with connection pooling

2015-03-09 Thread Michael Bayer
Kent jkentbo...@gmail.com wrote: Is it safe, from within either the 'before_execute' or 'before_cursor_execute' events, to use the same connection to execute a SQL statement before the current one? I assume there is a good chance the answer is no, at least for before_cursor_execute. if

[sqlalchemy] Database session variables with connection pooling

2015-03-07 Thread Kent
I'm implementing database session variables (in Oracle, DBMS_SESSION.SET_CONTEXT(...)), in order to be able to set (from sqlalchemy) and retrieve (from a database trigger) the application userid and URL path during table audit triggers. The tricky bit is that if I set the user to 'user1', that

Re: [sqlalchemy] Database session variables with connection pooling

2015-03-07 Thread Michael Bayer
Kent jkentbo...@gmail.com wrote: I'm implementing database session variables (in Oracle, DBMS_SESSION.SET_CONTEXT(...)), in order to be able to set (from sqlalchemy) and retrieve (from a database trigger) the application userid and URL path during table audit triggers. The tricky bit