Ensure auto complete should works when first identifier in the FROM clause needs quoting. Fixes #3809

This commit is contained in:
Akshay Joshi 2019-01-03 17:22:42 +05:30
parent 6a9406237a
commit 3a130d68c5
2 changed files with 4 additions and 0 deletions

View File

@ -31,5 +31,6 @@ Bug fixes
| `Bug #3797 <https://redmine.postgresql.org/issues/3797>`_ - Prevent attempts to bulk-drop schema objects.
| `Bug #3798 <https://redmine.postgresql.org/issues/3798>`_ - Ensure the browser toolbar buttons work in languages other than English.
| `Bug #3805 <https://redmine.postgresql.org/issues/3805>`_ - Allow horizontal sizing of the edit grid text pop-out.
| `Bug #3809 <https://redmine.postgresql.org/issues/3809>`_ - Ensure auto complete should works when first identifier in the FROM clause needs quoting.
| `Bug #3821 <https://redmine.postgresql.org/issues/3821>`_ - Ensure identifiers are properly displayed in the plan viewer.
| `Bug #3830 <https://redmine.postgresql.org/issues/3830>`_ - Make the setup process more robust against aborted executions.

View File

@ -437,6 +437,9 @@ class SQLAutoComplete(object):
match_end_limit = len(text)
def _match(item):
# Text starts with double quote; Remove quoting and
# match on everything that follows the double-quote.
item = self.unescape_name(item.lower())
match_point = item.lower().find(text, 0, match_end_limit)
if match_point >= 0:
# Use negative infinity to force keywords to sort after all