File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
python/plugins/processing/algs/gdal Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -202,17 +202,20 @@ def getConsoleCommands(self):
202
202
arguments .append ('"' + shapeEncoding + '"' )
203
203
arguments .append ('-f' )
204
204
arguments .append ('PostgreSQL' )
205
- arguments .append ('PG:"host=' + host )
206
- arguments .append ('port=' + port )
207
- if len (dbname ) > 0 :
205
+ arguments .append ('PG:"' )
206
+ if host :
207
+ arguments .append (' host=' + host )
208
+ if port :
209
+ arguments .append ('port=' + port )
210
+ if dbname :
208
211
arguments .append ('dbname=' + dbname )
209
- if len ( password ) > 0 :
212
+ if password :
210
213
arguments .append ('password=' + password )
211
- if len ( schema ) > 0 :
214
+ if schema :
212
215
arguments .append ('active_schema=' + schema )
213
- else :
214
- arguments .append ('active_schema=public' )
215
- arguments .append ('user=' + user + ' "' )
216
+ if user :
217
+ arguments .append ('user=' + user )
218
+ arguments .append ('"' )
216
219
arguments .append (dimstring )
217
220
arguments .append (ogrLayer )
218
221
arguments .append (ogrLayerName (inLayer ))
You can’t perform that action at this time.
0 commit comments