mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure auto-complete works for objects in schemas other than public and pg_catalog. Fixes #3630
This commit is contained in:
@@ -116,16 +116,22 @@ class SQLAutoComplete(object):
|
||||
|
||||
self.search_path = []
|
||||
schema_names = []
|
||||
# Fetch the search path
|
||||
if self.conn.connected():
|
||||
# Fetch the search path
|
||||
query = render_template(
|
||||
"/".join([self.sql_path, 'schema.sql']), search_path=True)
|
||||
status, res = self.conn.execute_dict(query)
|
||||
if status:
|
||||
for record in res['rows']:
|
||||
schema_names.append(record['schema'])
|
||||
self.search_path.append(record['schema'])
|
||||
|
||||
# Fetch the schema names
|
||||
query = render_template("/".join([self.sql_path, 'schema.sql']))
|
||||
status, res = self.conn.execute_dict(query)
|
||||
if status:
|
||||
for record in res['rows']:
|
||||
schema_names.append(record['schema'])
|
||||
|
||||
pref = Preferences.module('sqleditor')
|
||||
keywords_in_uppercase = \
|
||||
pref.preference('keywords_in_uppercase').get()
|
||||
|
||||
Reference in New Issue
Block a user