mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Improve identify_system: don't hardcode column names
This commit is contained in:
parent
80da76d43f
commit
44b705f88f
|
@ -488,7 +488,7 @@ class ReplicationCursor(_cursor):
|
||||||
"""Get information about the cluster status."""
|
"""Get information about the cluster status."""
|
||||||
|
|
||||||
self.execute("IDENTIFY_SYSTEM")
|
self.execute("IDENTIFY_SYSTEM")
|
||||||
return dict(zip(['systemid', 'timeline', 'xlogpos', 'dbname'],
|
return dict(zip([_.name for _ in self.description],
|
||||||
self.fetchall()[0]))
|
self.fetchall()[0]))
|
||||||
|
|
||||||
def quote_ident(self, ident):
|
def quote_ident(self, ident):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user