I don't have redshift available to test. Keep in mind SET is
usually per-"session", that is, Postgresql/redshift "session". When
a new connection starts up, that old setting is gone. So it depends
on how db_session is being set up.
E.g.:
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
e = create_engine("postgresql://scott:tiger@localhost/test",
echo=True)
db_session = Session(e)
print db_session.execute('SHOW statement_timeout').scalar()
db_session.execute('SET statement_timeout=10')
# uncomment this to show it go back to zero
# db_session.connection().invalidate()
# db_session.rollback()
print db_session.execute('SHOW statement_timeout').scalar()
--
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 sqlalchemy+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.