mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Quote identifiers correctly in auto-complete. Fixes #1992
This commit is contained in:
parent
a64824a851
commit
e160909423
@ -252,7 +252,14 @@ class SQLAutoComplete(object):
|
||||
|
||||
result = dict()
|
||||
for m in matches:
|
||||
result[m.completion.display] = {'object_type': m.completion.display_meta}
|
||||
# Escape name only if meta type is not a keyword and datatype.
|
||||
if m.completion.display_meta != 'keyword' and \
|
||||
m.completion.display_meta != 'datatype':
|
||||
name = self.escape_name(m.completion.display)
|
||||
else:
|
||||
name = m.completion.display
|
||||
|
||||
result[name] = {'object_type': m.completion.display_meta}
|
||||
|
||||
return result
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user