summaryrefslogtreecommitdiff
path: root/lib/extras.py
diff options
context:
space:
mode:
authorOleksandr Shulgin <oleksandr.shulgin@zalando.de>2015-06-02 16:52:48 +0200
committerOleksandr Shulgin <oleksandr.shulgin@zalando.de>2015-06-02 16:52:48 +0200
commit44b705f88f45211a778c07f909b2aa1d91da05e6 (patch)
tree79f0bdf97e6e9fec8590137705aa79c8a2e119e4 /lib/extras.py
parent80da76d43fb23e5ba915eac499927a12d4526496 (diff)
downloadpsycopg2-44b705f88f45211a778c07f909b2aa1d91da05e6.tar.gz
Improve identify_system: don't hardcode column names
Diffstat (limited to 'lib/extras.py')
-rw-r--r--lib/extras.py2
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):