mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] Allow using libpq defaults for host,port,user,pass and dbname
Fixes #15706
This commit is contained in:
parent
b83fbb16c9
commit
d63222e68e
@ -203,17 +203,20 @@ class Ogr2OgrToPostGis(GdalAlgorithm):
|
||||
arguments.append('"' + shapeEncoding + '"')
|
||||
arguments.append('-f')
|
||||
arguments.append('PostgreSQL')
|
||||
arguments.append('PG:"host=' + host)
|
||||
arguments.append('port=' + port)
|
||||
if len(dbname) > 0:
|
||||
arguments.append('PG:"')
|
||||
if host:
|
||||
arguments.append(' host=' + host)
|
||||
if port:
|
||||
arguments.append('port=' + port)
|
||||
if dbname:
|
||||
arguments.append('dbname=' + dbname)
|
||||
if len(password) > 0:
|
||||
if password:
|
||||
arguments.append('password=' + password)
|
||||
if len(schema) > 0:
|
||||
if schema:
|
||||
arguments.append('active_schema=' + schema)
|
||||
else:
|
||||
arguments.append('active_schema=public')
|
||||
arguments.append('user=' + user + '"')
|
||||
if user:
|
||||
arguments.append('user=' + user)
|
||||
arguments.append('"')
|
||||
arguments.append(dimstring)
|
||||
arguments.append(ogrLayer)
|
||||
arguments.append(ogrLayerName(inLayer))
|
||||
|
Loading…
x
Reference in New Issue
Block a user