mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-18 00:04:02 -04:00
[dbmanager] fixes #17476: QGIS master: update SQL layer error if name contains uppercase chars
This commit is contained in:
parent
b2c6464e58
commit
ea7c2af74b
@ -154,9 +154,9 @@ class DlgSqlLayerWindow(QWidget, Ui_Dialog):
|
||||
if not sql.startswith('(') and not sql.endswith(')'):
|
||||
schema = uri.schema()
|
||||
if schema and schema.upper() != 'PUBLIC':
|
||||
sql = 'SELECT * FROM ' + schema + '.' + sql
|
||||
sql = 'SELECT * FROM {0}.{1}'.format(self.db.connector.quoteId(schema), self.db.connector.quoteId(sql))
|
||||
else:
|
||||
sql = 'SELECT * FROM ' + sql
|
||||
sql = 'SELECT * FROM {0}'.format(self.db.connector.quoteId(sql))
|
||||
self.editSql.setText(sql)
|
||||
self.executeSql()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user