Comment 2 for bug 947455

Revision history for this message
Stuart Bishop (stub) wrote :

>>> import storm
>>> storm.version
'0.19.0.99'
>>> 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 "storm/store.py", line 108, in execute
    return self._connection.execute(statement, params, noresult)
  File "storm/databases/postgres.py", line 261, in execute
    return Connection.execute(self, statement, params, noresult)
  File "storm/database.py", line 238, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "storm/databases/postgres.py", line 271, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "storm/database.py", line 322, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "storm/database.py", line 376, in _check_disconnect
    raise DisconnectionError(str(exc))
storm.exceptions.DisconnectionError: terminating connection due to administrator command
FATAL: terminating connection due to administrator command