PostgresOSM.disconnect_other_databases¶
-
PostgresOSM.
disconnect_other_databases
()¶ Kill connections to all other databases of the PostgreSQL server being connected.
Example:
>>> from pyhelpers.sql import PostgreSQL >>> testdb = PostgreSQL('localhost', 5432, username='postgres', database_name='testdb') Password (postgres@localhost:5432): *** Connecting postgres:***@localhost:5432/testdb ... Successfully. >>> print(testdb.database_name) testdb >>> testdb.disconnect_other_databases() >>> print(testdb.database_name) postgres