From 715fa47eb699f741d3c5808690bf5fa65590542d Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Thu, 13 Jul 2023 10:18:38 +0530 Subject: [PATCH] Fix an error 'list' object has no attribute 'strip' while attempting to populate auto-complete manually the first time. #6556 --- docs/en_US/config_py.rst | 4 ++-- web/pgadmin/utils/driver/psycopg3/connection.py | 4 ++-- web/pgadmin/utils/driver/psycopg3/typecast.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/en_US/config_py.rst b/docs/en_US/config_py.rst index 67cc4f97d..3f9361968 100644 --- a/docs/en_US/config_py.rst +++ b/docs/en_US/config_py.rst @@ -27,8 +27,8 @@ The configuration files are as follows: needed. * ``config_local.py``: This file is read after ``config_distro.py`` and is intended - for end users to change any default or packaging specific settings that they may - wish to adjust to meet local preferences or standards.This file is optional, + for the owner of the installation to change any default or packaging specific settings + that they may wish to adjust to meet local preferences or standards.This file is optional, and may be created by users in the same directory as ``config.py`` if needed. diff --git a/web/pgadmin/utils/driver/psycopg3/connection.py b/web/pgadmin/utils/driver/psycopg3/connection.py index 3856392c8..cf13a4c88 100644 --- a/web/pgadmin/utils/driver/psycopg3/connection.py +++ b/web/pgadmin/utils/driver/psycopg3/connection.py @@ -495,8 +495,6 @@ class Connection(BaseConnection): register_string_typecasters(self.conn) - status, cur = self.__cursor() - manager = self.manager # autocommit flag does not work with asynchronous connections. @@ -514,6 +512,8 @@ class Connection(BaseConnection): postgres_encoding, self.python_encoding = \ get_encoding(self.conn.info.encoding) + status, cur = self.__cursor() + # Note that we use 'UPDATE pg_settings' for setting bytea_output as a # convenience hack for those running on old, unsupported versions of # PostgreSQL 'cos we're nice like that. diff --git a/web/pgadmin/utils/driver/psycopg3/typecast.py b/web/pgadmin/utils/driver/psycopg3/typecast.py index 0bfdc479b..a1213fa3a 100644 --- a/web/pgadmin/utils/driver/psycopg3/typecast.py +++ b/web/pgadmin/utils/driver/psycopg3/typecast.py @@ -87,9 +87,9 @@ RECORD_ARRAY = (2287,) PSYCOPG_SUPPORTED_BUILTIN_ARRAY_DATATYPES = ( 1016, 1005, 1006, 1007, 1021, 1022, 1231, - 1002, 1003, 1009, 1014, 1015, 1009, 1014, - 1015, 1000, 1115, 1185, 1183, 1270, 1182, - 1187, 1001, 1028, 1013, 1041, 651, 1040 + 1002, 1003, 1009, 1014, 1015, 1014, 1015, + 1000, 1115, 1185, 1183, 1270, 1182, 1187, + 1001, 1028, 1013, 1041, 651, 1040 ) # json, jsonb