diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2021-05-07 12:52:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 12:52:45 -0700 |
commit | d8532df22e1f309c8a05a452d752bd30f4869bbe (patch) | |
tree | 2235b0a531bdf4122431310a252a31139e85d9a1 /pgcli/pgcompleter.py | |
parent | 0ada5a6c6aa1ca1d1e028f00691862629f521308 (diff) | |
parent | 898f8255e051ee6a64099723f21f31980ecdd380 (diff) |
Merge pull request #1266 from dbcli/search_path_functions
Include functions from search_path in completion.
Diffstat (limited to 'pgcli/pgcompleter.py')
-rw-r--r-- | pgcli/pgcompleter.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pgcli/pgcompleter.py b/pgcli/pgcompleter.py index 79be274e..227e25c6 100644 --- a/pgcli/pgcompleter.py +++ b/pgcli/pgcompleter.py @@ -140,7 +140,7 @@ class PGCompleter(Completer): return "'{}'".format(self.unescape_name(name)) def unescape_name(self, name): - """ Unquote a string.""" + """Unquote a string.""" if name and name[0] == '"' and name[-1] == '"': name = name[1:-1] @@ -703,7 +703,11 @@ class PGCompleter(Completer): not f.is_aggregate and not f.is_window and not f.is_extension - and (f.is_public or f.schema_name == suggestion.schema) + and ( + f.is_public + or f.schema_name in self.search_path + or f.schema_name == suggestion.schema + ) ) else: |