diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-10-13 03:28:42 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-10-13 03:28:42 +0100 |
commit | 44bd2927c50c516bde149021ee5560f4b295d5b7 (patch) | |
tree | fe7526f42178c376bed007aec159b55303608969 /lib/extras.py | |
parent | 704e6797e7dd4ac0046caa3230a8faa1f247859f (diff) | |
download | psycopg2-connection-info.tar.gz |
Use the connection.info properties instead of the legacy methodsconnection-info
Diffstat (limited to 'lib/extras.py')
-rw-r--r-- | lib/extras.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/extras.py b/lib/extras.py index af59d2f..4dea3f9 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -806,7 +806,7 @@ class HstoreAdapter(object): self.conn = conn # use an old-style getquoted implementation if required - if conn.server_version < 90000: + if conn.info.server_version < 90000: self.getquoted = self._getquoted_8 def _getquoted_8(self): @@ -911,7 +911,7 @@ class HstoreAdapter(object): conn_status = conn.status # column typarray not available before PG 8.3 - typarray = conn.server_version >= 80300 and "typarray" or "NULL" + typarray = conn.info.server_version >= 80300 and "typarray" or "NULL" rv0, rv1 = [], [] @@ -1097,7 +1097,7 @@ class CompositeCaster(object): schema = 'public' # column typarray not available before PG 8.3 - typarray = conn.server_version >= 80300 and "typarray" or "NULL" + typarray = conn.info.server_version >= 80300 and "typarray" or "NULL" # get the type oid and attributes curs.execute("""\ |