Fixed autocomplete issue where it is not showing any suggestions if the schema name contains escape characters. Fixes #6045.

This commit is contained in:
Nikhil Mohite 2021-01-29 11:45:38 +05:30 committed by Akshay Joshi
parent ab642344d4
commit 36f76f5e2c
2 changed files with 2 additions and 1 deletions

View File

@ -18,3 +18,4 @@ Bug fixes
********* *********
| `Issue #5871 <https://redmine.postgresql.org/issues/5871>`_ - Ensure that username should be visible in the 'Connect to Server' popup when service and user name both specified. | `Issue #5871 <https://redmine.postgresql.org/issues/5871>`_ - Ensure that username should be visible in the 'Connect to Server' popup when service and user name both specified.
| `Issue #6045 <https://redmine.postgresql.org/issues/6045>`_ - Fixed autocomplete issue where it is not showing any suggestions if the schema name contains escape characters.

View File

@ -1105,7 +1105,7 @@ class SQLAutoComplete(object):
query = '' query = ''
if schema: if schema:
in_clause = '\'' + schema + '\'' in_clause = '\'' + schema.replace("'", "''") + '\''
else: else:
for r in self.search_path: for r in self.search_path:
in_clause += '\'' + r + '\',' in_clause += '\'' + r + '\','