Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Processing] Fix ogr2ogr postgis table overwrite
- Loading branch information
|
@@ -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) |
|
|