Bug report #21834

Split feature adds auto incremental number, no way to stop that

Added by Sabin Kolarov over 5 years ago. Updated over 5 years ago.

Status:Feedback
Priority:Normal
Assignee:-
Category:Editing
Affected QGIS version:3.6.1 Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29649

Description

I have a PostGIS layer with a field (named tr_link_id) with constrained:
CONSTRAINT tr_link_id_null_or_bigger_than_zero_check CHECK (tr_link_id IS NULL OR tr_link_id > 0))

Every time I use Split feature tool qGIS adds automatically next non-used number. I tried to add a default value NULL in the attributed form, but it does not help. This problem was introduced in 3.6.0, qGIS version 3.4.6 has no such behavior.

Version information:
PostgreSQL 11.2 (Debian 11.2-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
POSTGIS="2.5.2 r17328" [EXTENSION] PGSQL="110" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.1.2, released 2016/10/24" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" TOPOLOGY RASTER

History

#1 Updated by Sabin Kolarov over 5 years ago

Just to add that Add feature does not have such behavior, and is working correctly.

#2 Updated by Sabin Kolarov over 5 years ago

Here is a picture if the attribute table properties:

#3 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback
  • Subject changed from Split feature adds auto incremental number, no way to stop that. to Split feature adds auto incremental number, no way to stop that

I can't confirm with data of my own (but the same identical constraint), I'm using 3.6.1 on Ubuntu.

Also available in: Atom PDF