diff --git a/docs/en_US/release_notes_3_7.rst b/docs/en_US/release_notes_3_7.rst index e8af0f963..6af835ed6 100644 --- a/docs/en_US/release_notes_3_7.rst +++ b/docs/en_US/release_notes_3_7.rst @@ -32,5 +32,6 @@ Bug fixes | `Bug #3798 `_ - Ensure the browser toolbar buttons work in languages other than English. | `Bug #3805 `_ - Allow horizontal sizing of the edit grid text pop-out. | `Bug #3809 `_ - Ensure auto complete should works when first identifier in the FROM clause needs quoting. +| `Bug #3810 `_ - Ensure auto complete should works for columns from a schema-qualified table. | `Bug #3821 `_ - Ensure identifiers are properly displayed in the plan viewer. | `Bug #3830 `_ - Make the setup process more robust against aborted executions. \ No newline at end of file diff --git a/web/pgadmin/utils/sqlautocomplete/autocomplete.py b/web/pgadmin/utils/sqlautocomplete/autocomplete.py index 502deb7cf..4ad928c7d 100644 --- a/web/pgadmin/utils/sqlautocomplete/autocomplete.py +++ b/web/pgadmin/utils/sqlautocomplete/autocomplete.py @@ -440,7 +440,7 @@ class SQLAutoComplete(object): # 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) + match_point = item.find(text, 0, match_end_limit) if match_point >= 0: # Use negative infinity to force keywords to sort after all # fuzzy matches @@ -525,10 +525,15 @@ class SQLAutoComplete(object): return result def get_column_matches(self, suggestion, word_before_cursor): + schema = None + if len(suggestion.table_refs) > 0 and \ + hasattr(suggestion.table_refs[0], 'schema') and \ + suggestion.table_refs[0].schema != '': + schema = suggestion.table_refs[0].schema # Tables and Views should be populated first. - self.fetch_schema_objects(None, 'tables') - self.fetch_schema_objects(None, 'views') + self.fetch_schema_objects(schema, 'tables') + self.fetch_schema_objects(schema, 'views') tables = suggestion.table_refs do_qualify = suggestion.qualifiable and {