Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when running "Import into PostGIS" in batch mode #23039

Closed
qgib opened this issue Jun 21, 2016 · 9 comments
Closed

Issues when running "Import into PostGIS" in batch mode #23039

qgib opened this issue Jun 21, 2016 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jun 21, 2016

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 15097
Affected QGIS version: master
Redmine category:processing/qgis
Assignee: Victor Olaya


  • when selecting layers from filesystem and the table name is left blank, to leave the tool use the input vector as name, then the absolute path of the input vector is used as table name
  • "table to import parameter" is filled with "none" when the tool is opened, and there is the suggestion to leave it blank to use the layer name. But then if the user leave "none" this word is used as table name.
  • "none" is used also as default for the "primary key field", if the user leave it then "none" is used as name for the PK column
  • compared to the tool in DB Manager it seems to miss the source/destination CRS parameters

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2016

Author Name: Giovanni Manghi (@gioman)


the "none" issues are a regression since 2.8.*


  • priority_id was changed from Normal to Severe/Regression
  • fixed_version_id was changed from Future Release - High Priority to Version 2.16

@qgib
Copy link
Contributor Author

qgib commented Aug 23, 2016

Author Name: Reinhard Reiterer (Reinhard Reiterer)


To me, this is a really important issue. I've uploaded a screencast for documentation purposes.


  • 10338 was configured as 15097.mp4

@qgib
Copy link
Contributor Author

qgib commented Oct 13, 2016

Author Name: Victor Olaya (@volaya)


These should be fixed already.

The only thing not fixed is your last suggestion about the dest crs, since that is a feature request. Also it would change the syntax of the algorithm, so it cannot be added to this next release. We should wait until 3.0

@qgib
Copy link
Contributor Author

qgib commented Oct 15, 2016

Author Name: Giovanni Manghi (@gioman)


Hi Victor, thanks for the fixes. I see still two issues:

  1. when the table name is left blank, once imported the table in Postgis has also the ".shp" in its name. I think is necessary to strip the extensions from inputs names.

  2. if the field for primary key is left blank the tool gives an error

Error importing to PostGIS Creation of data source "public"."aaa" failed: ERROR: syntax error at or near "," LINE 1: CREATE TABLE "public"."aaa"(, PRIMARY KEY () ) ^

I would suggest to fill this field out of the box with a default like "gid" or just "id".

@qgib
Copy link
Contributor Author

qgib commented Oct 16, 2016

Author Name: Victor Olaya (@volaya)


Fixed in changeset "e58177cf9e360021618d6029821cbc8416496cff".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 17, 2016

Author Name: Giovanni Manghi (@gioman)


the latest build of master on osgeo4w is 979d619 that does not contain the latest commits, among the others the latest patch for this ticket. So I applied the patch manually but at that point the tool returns "Error importing to PostGIS Creation of data source "schema_name"."" failed: ERROR: zero-length delimited identifier at or near """" LINE 1: CREATE TABLE "schema_name".""(gid serial, PRIMARY KEY (gid) ) ^" but I soon realized that this error is also shown without the patch. At this point from "master_2" I downloaded the whole Processing folder and placed in plugins folder in .qgis2: no more error but also "missing parameter value: Table to import..." when leaving the table name blank. The "primary key field" seems fixed.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Oct 18, 2016

Author Name: Victor Olaya (@volaya)


Fixed in changeset "e55d1923fc08900864f7ef02866cca0a2e11cc15".


  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2016

Author Name: Giovanni Manghi (@gioman)


@volaya @alexbruy
tested the latest master_2

"missing parameter value: Table to import..."
when leaving the table name blank (both batch and normal use)


  • status_id was changed from Closed to Reopened
  • fixed_version_id was changed from Version 2.16 to Version 2.18

@qgib
Copy link
Contributor Author

qgib commented Nov 21, 2016

Author Name: Nyall Dawson (@nyalldawson)


Fixed in changeset "271e67e37b781260d889778e97064efae72a0b15".


  • status_id was changed from Reopened to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.18 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant