But not in the latest release...
>>> import storm >>> storm.version '0.19' >>> from storm.locals import * >>> database = create_database('postgres:stub') >>> store = Store(database) >>> store.execute('select true').get_one()[0] True >>> store.execute('select pg_terminate_backend(pg_backend_pid())') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/store.py", line 108, in execute return self._connection.execute(statement, params, noresult) File "/usr/local/lib/python2.7/dist-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/databases/postgres.py", line 249, in execute return Connection.execute(self, statement, params, noresult) File "/usr/local/lib/python2.7/dist-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/database.py", line 238, in execute raw_cursor = self.raw_execute(statement, params) File "/usr/local/lib/python2.7/dist-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/databases/postgres.py", line 259, in raw_execute return Connection.raw_execute(self, statement, params) File "/usr/local/lib/python2.7/dist-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/database.py", line 322, in raw_execute self._check_disconnect(raw_cursor.execute, *args) File "/usr/local/lib/python2.7/dist-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/database.py", line 371, in _check_disconnect return function(*args, **kwargs) psycopg2.OperationalError: terminating connection due to administrator command FATAL: terminating connection due to administrator command
But not in the latest release...
>>> import storm database( 'postgres: stub') 'select true').get_one()[0] 'select pg_terminate_ backend( pg_backend_ pid())' ) lib/python2. 7/dist- packages/ storm-0. 19-py2. 7-linux- x86_64. egg/storm/ store.py" , line 108, in execute n.execute( statement, params, noresult) lib/python2. 7/dist- packages/ storm-0. 19-py2. 7-linux- x86_64. egg/storm/ databases/ postgres. py", line 249, in execute execute( self, statement, params, noresult) lib/python2. 7/dist- packages/ storm-0. 19-py2. 7-linux- x86_64. egg/storm/ database. py", line 238, in execute execute( statement, params) lib/python2. 7/dist- packages/ storm-0. 19-py2. 7-linux- x86_64. egg/storm/ databases/ postgres. py", line 259, in raw_execute raw_execute( self, statement, params) lib/python2. 7/dist- packages/ storm-0. 19-py2. 7-linux- x86_64. egg/storm/ database. py", line 322, in raw_execute _check_ disconnect( raw_cursor. execute, *args) lib/python2. 7/dist- packages/ storm-0. 19-py2. 7-linux- x86_64. egg/storm/ database. py", line 371, in _check_disconnect OperationalErro r: terminating connection due to administrator command
>>> storm.version
'0.19'
>>> from storm.locals import *
>>> database = create_
>>> store = Store(database)
>>> store.execute(
True
>>> store.execute(
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/
return self._connectio
File "/usr/local/
return Connection.
File "/usr/local/
raw_cursor = self.raw_
File "/usr/local/
return Connection.
File "/usr/local/
self.
File "/usr/local/
return function(*args, **kwargs)
psycopg2.
FATAL: terminating connection due to administrator command