Bug report #15097
Issues when running "Import into PostGIS" in batch mode
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Victor Olaya | ||
Category: | Processing/QGIS | ||
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 #: | 23039 |
Description
- 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
Associated revisions
[processing] fixes for 'import into PostGIS' alg
fixes #15097
[processing] fixes for 'import into PostGIS' alg
fixes #15097
History
#1 Updated by Giovanni Manghi over 8 years ago
- Priority changed from Normal to Severe/Regression
- Target version changed from Future Release - High Priority to Version 2.16
the "none" issues are a regression since 2.8.*
#2 Updated by R. R. about 8 years ago
- File 15097.mp4 added
To me, this is a really important issue. I've uploaded a screencast for documentation purposes.
#3 Updated by Victor Olaya about 8 years ago
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
#4 Updated by Giovanni Manghi about 8 years ago
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".
#5 Updated by Victor Olaya about 8 years ago
- Status changed from Open to Closed
Fixed in changeset e58177cf9e360021618d6029821cbc8416496cff.
#6 Updated by Giovanni Manghi about 8 years ago
- Status changed from Closed to Reopened
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.
#7 Updated by Victor Olaya about 8 years ago
- Status changed from Reopened to Closed
Fixed in changeset e55d1923fc08900864f7ef02866cca0a2e11cc15.
#8 Updated by Giovanni Manghi about 8 years ago
- Status changed from Closed to Reopened
- Target version changed from Version 2.16 to Version 2.18
@volaya @alexbruy
tested the latest master_2
"missing parameter value: Table to import..."
when leaving the table name blank (both batch and normal use)
#9 Updated by Nyall Dawson almost 8 years ago
- Status changed from Reopened to Closed
Fixed in changeset 271e67e37b781260d889778e97064efae72a0b15.