Skip to content
Permalink
Browse files

Merge pull request #3119 from arnaud-morvan/processing_fix_postgis_ov…

…erwrite

[processing] fix ogr2ogr postgis table overwrite
  • Loading branch information
alexbruy committed May 30, 2016
2 parents b52828f + 75461aa commit 2069c27c8512a182885ad14527f3383619b42996
@@ -170,9 +170,12 @@ def getConsoleCommands(self):
arguments.append(pkstring)
elif primary_key is not None:
arguments.append("-lco FID=" + primary_key)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
if len(table) == 0:
table = ogrLayerName(inLayer).lower()
if schema:
table = '{}.{}'.format(schema, table)
arguments.append('-nln')
arguments.append(table)
if skipfailures:
arguments.append('-skipfailures')
if where:
@@ -227,9 +227,12 @@ def getConsoleCommands(self):
arguments.append(pkstring)
elif primary_key is not None:
arguments.append("-lco FID=" + primary_key)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
if len(table) == 0:
table = ogrLayerName(inLayer).lower()
if schema:
table = '{}.{}'.format(schema, table)
arguments.append('-nln')
arguments.append(table)
if len(ssrs) > 0:
arguments.append('-s_srs')
arguments.append(ssrs)
@@ -233,9 +233,12 @@ def getConsoleCommands(self):
arguments.append(pkstring)
elif primary_key is not None:
arguments.append("-lco FID=" + primary_key)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
if len(table) == 0:
table = ogrLayerName(inLayer).lower()
if schema:
table = '{}.{}'.format(schema, table)
arguments.append('-nln')
arguments.append(table)
if len(ssrs) > 0:
arguments.append('-s_srs')
arguments.append(ssrs)

0 comments on commit 2069c27

Please sign in to comment.
You can’t perform that action at this time.