Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing][gdal] Fix escaping of connection string in OGR to postgis
alg

Fixes #41839

(cherry picked from commit 6a7e4c1)
  • Loading branch information
nyalldawson committed Feb 27, 2021
1 parent 29d0cff commit 0115190
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
Expand Up @@ -251,14 +251,14 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
if shapeEncoding:
arguments.append('--config')
arguments.append('SHAPE_ENCODING')
arguments.append('"' + shapeEncoding + '"')
arguments.append(shapeEncoding)
arguments.append('-f')
arguments.append('PostgreSQL')
arguments.append('PG:"')
for token in QgsDataSourceUri(uri).connectionInfo(executing).split(' '):
arguments.append(token)
arguments.append('active_schema={}'.format(schema or 'public'))
arguments.append('"')

connection_parts = QgsDataSourceUri(uri).connectionInfo(executing).split(' ')
connection_parts.append('active_schema={}'.format(schema or 'public'))
arguments.append('PG:{}'.format(' '.join(connection_parts)))

arguments.append(dimstring)
arguments.append(ogrLayer)
arguments.append(layername)
Expand Down

0 comments on commit 0115190

Please sign in to comment.