Bug report #19667
Processing "import into PostGIS" does not allow to choose an arbitrary name for the (new) column that will be defined as primary key
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/QGIS | ||
Affected QGIS version: | 3.3(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 #: | 27492 |
Description
The tool allows to choose among the existing columns, but does not allow to choose an arbitrary name (that will be used to create a new column) as does DB Manager or the OGR based tool. This is particularly problematic when the vector being imported has already an "id" column that has duplicates values. In fact when no column is choose to be used for the PK then the tool always use "id" for the PK column, and if this exist (but not suitable because of duplicates) then the operation fails.
I'm under the impression that in 2.* (but not on 2.18.22 as I just checked) in such case both DB Manager and the Processing/QGIS tool used to create a new column called "id_1" or something similar.
Related issues
History
#1 Updated by Jürgen Fischer about 6 years ago
- Related to Bug report #19657: QGIS3: unable to turn off PK creation (export to PostgreSQL) added