File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed
python/plugins/processing/algs/gdal Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -170,9 +170,12 @@ def getConsoleCommands(self):
170
170
arguments .append (pkstring )
171
171
elif primary_key is not None :
172
172
arguments .append ("-lco FID=" + primary_key )
173
- if len (table ) > 0 :
174
- arguments .append ('-nln' )
175
- arguments .append (table )
173
+ if len (table ) == 0 :
174
+ table = ogrLayerName (inLayer ).lower ()
175
+ if schema :
176
+ table = '{}.{}' .format (schema , table )
177
+ arguments .append ('-nln' )
178
+ arguments .append (table )
176
179
if skipfailures :
177
180
arguments .append ('-skipfailures' )
178
181
if where :
Original file line number Diff line number Diff line change @@ -227,9 +227,12 @@ def getConsoleCommands(self):
227
227
arguments .append (pkstring )
228
228
elif primary_key is not None :
229
229
arguments .append ("-lco FID=" + primary_key )
230
- if len (table ) > 0 :
231
- arguments .append ('-nln' )
232
- arguments .append (table )
230
+ if len (table ) == 0 :
231
+ table = ogrLayerName (inLayer ).lower ()
232
+ if schema :
233
+ table = '{}.{}' .format (schema , table )
234
+ arguments .append ('-nln' )
235
+ arguments .append (table )
233
236
if len (ssrs ) > 0 :
234
237
arguments .append ('-s_srs' )
235
238
arguments .append (ssrs )
Original file line number Diff line number Diff line change @@ -233,9 +233,12 @@ def getConsoleCommands(self):
233
233
arguments .append (pkstring )
234
234
elif primary_key is not None :
235
235
arguments .append ("-lco FID=" + primary_key )
236
- if len (table ) > 0 :
237
- arguments .append ('-nln' )
238
- arguments .append (table )
236
+ if len (table ) == 0 :
237
+ table = ogrLayerName (inLayer ).lower ()
238
+ if schema :
239
+ table = '{}.{}' .format (schema , table )
240
+ arguments .append ('-nln' )
241
+ arguments .append (table )
239
242
if len (ssrs ) > 0 :
240
243
arguments .append ('-s_srs' )
241
244
arguments .append (ssrs )
You can’t perform that action at this time.
0 commit comments