Feature request #14344

Individual name for primary key in 'New SpatiaLite Layer' dialogue

Added by R. R. over 8 years ago. Updated about 7 years ago.

Category:Data Provider/SpatiaLite
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:22330


Please allow users to set the name of the primary key individually in the 'New SpatiaLite Layer' dialogue (Crtl+Shift+A).

new_spatialite_layer.png (54.8 KB) R. R., 2016-06-19 02:03 AM

new_geopackage_layer.png (54 KB) R. R., 2016-06-19 02:03 AM


#1 Updated by R. R. almost 8 years ago

Maybe 'New SpatiaLite Layer' and 'New GeoPackage Layer' should share the same dialog. 'New GeoPackage Layer' allows to set the name of the primary key/feature id individually.

#2 Updated by Jukka Rahkonen almost 8 years ago

The "Create autoincrementing primary key" exists there probably because of the word "autoincrementing". SQLite has always a primary key in the system "ROWID". Creating a synonym for ROWID as "COLUMN INTEGER PRIMARY KEY AUTOINCREMENT" makes fids stable so that that the rowids of deleted rows will not be reused.

Would you like to have two selections:
- prevent reuse of rowids of deleted features (autoincrement)
- select the name to be used as synonym for ROWID?

#3 Updated by R. R. almost 8 years ago

Primary keys for new SpatiaLite layers are always named 'pkuid'. The 'New SpatiaLite Layer' dialog misses a text field to set the name (e.g. 'gid', 'fid').

#4 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF