Bug report #13122

ogr import in PostGIS error

Added by Paolo Cavallini over 4 years ago. Updated almost 4 years ago.

Status:Closed
Priority:Normal
Assignee:Giovanni Manghi
Category:Processing/OGR
Affected QGIS version:2.8.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:21187

Description

This command:

processing.runandload("gdalogr:importvectorintopostgisdatabaseavailableconnections",0,"dbname='test' host=test port=1523 user='georef' password='***' estimatedmetadata=true srid=8307 type=POINT table="GEOREF"."GEO_NODI_BT" (GEOMETRY_WGS84) sql=",3,"EPSG:4326","","","georef","geo_node","id","None","geom",0,"","","-180.0,180.0,-90.0,90.0",False,"","",False,False,False,False,False,False,True,True,"")

returns

SyntaxError: invalid syntax

It might be due to the quotation. Probably processing should replace " with \\" if the argument contains an " when preparing the call.

History

#1 Updated by Giovanni Manghi over 4 years ago

  • Assignee set to Giovanni Manghi
  • Subject changed from Import fails to ogr import in PostGIS error

#2 Updated by Giovanni Manghi about 4 years ago

  • Status changed from Open to Feedback

still an issue?

#3 Updated by Giovanni Manghi almost 4 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

closing for lack of feedback. Please reopen if necessary.

#4 Updated by Paolo Cavallini almost 4 years ago

Agreed, seems fixed now.

Also available in: Atom PDF