diff options
author | Oleksandr Shulgin <oleksandr.shulgin@zalando.de> | 2015-06-02 16:52:48 +0200 |
---|---|---|
committer | Oleksandr Shulgin <oleksandr.shulgin@zalando.de> | 2015-06-02 16:52:48 +0200 |
commit | 44b705f88f45211a778c07f909b2aa1d91da05e6 (patch) | |
tree | 79f0bdf97e6e9fec8590137705aa79c8a2e119e4 /lib/extras.py | |
parent | 80da76d43fb23e5ba915eac499927a12d4526496 (diff) | |
download | psycopg2-44b705f88f45211a778c07f909b2aa1d91da05e6.tar.gz |
Improve identify_system: don't hardcode column names
Diffstat (limited to 'lib/extras.py')
-rw-r--r-- | lib/extras.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/extras.py b/lib/extras.py index 4d92e6f..92dd819 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -488,7 +488,7 @@ class ReplicationCursor(_cursor): """Get information about the cluster status.""" self.execute("IDENTIFY_SYSTEM") - return dict(zip(['systemid', 'timeline', 'xlogpos', 'dbname'], + return dict(zip([_.name for _ in self.description], self.fetchall()[0])) def quote_ident(self, ident): |