Bug report #6907

importing shapefile into PG with drag and drop does not work

Added by Giovanni Manghi about 11 years ago. Updated over 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:DB Manager
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16032

Description

I can import the attached shapefile using DB manager new "load layer" function, and it takes just a few seconds as it does SPIT, but if I try to import it using the D&D from the qgis browser then the operation never ends (or if it ends it takes ages).

The issue seems to be the following:

the shape has already an "id" column and DB manager try to use the same name for the primary key. In QGIS 1.8 the import fails with an error (column duplicate), while in master the process goes nowhere.

if the primary key column name is changed manually then it works as expected.

I'm testing using a local PG server.

shape.zip (2.24 MB) Giovanni Manghi, 2012-12-20 11:11 AM

Associated revisions

Revision 460f578d
Added by Jürgen Fischer about 11 years ago

- [API] add optional progress dialog to QgsVectorLayerImport
- postgres/mssql: fix primary key generation on import (fixes #6907)
- fix crash on browser refresh after vector layer import

History

#1 Updated by Paolo Cavallini about 11 years ago

  • Assignee changed from Giuseppe Sucameli to anonymous -

#2 Updated by Jürgen Fischer about 11 years ago

  • Status changed from Open to Closed

#3 Updated by Jürgen Fischer over 9 years ago

  • Assignee deleted (anonymous -)

Also available in: Atom PDF