Bug report #20397
QGIS 3.4 Incorrect handling of Postgres serial columns
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Data Provider/PostGIS | ||
Affected QGIS version: | 3.4.0 | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28217 |
Description
Starting with QGIS 3.4, I am unable to digitize multiple features between saves for PostGIS layers with a serial column that has a unique constraint. It appears the serial column's default text is triggering QGIS unique constraint enforcement.
Note: In the attached screenshot, `structure_id` is the primary key column.
Related issues
Associated revisions
History
#1 Updated by Giovanni Manghi about 6 years ago
- Priority changed from Normal to High
- Operating System deleted (
macOS 10.14.1)
#2 Updated by Burghardt Scholle almost 6 years ago
I can confirm your description with QGIS DEV code revision 7cce9b3eb9. After digitizing a new feature I have to save first before I can continue with the next feature. Otherwise I get the same error message in the PostGIS-Tab of the log:
2018-11-16T09:53:49 WARNING Query: DECLARE qgis_1774 BINARY CURSOR FOR SELECT "gid","datum"::text,"bearbeiter"::text,"veranstaltung"::text,"beschriftung"::text,"name"::text,"flaechentyp"::text,"farbe"::text,"schraff_width"::text,"schraff_width_prt"::text,"schraff_size"::text,"schraff_size_prt"::text,"schraff_winkel"::text,"umrissfarbe"::text,"umrisstyp"::text,"umrissstaerke"::text,"umrissstaerke_prt"::text,"umfang"::text,"flaeche"::text,"bemerkung"::text,"last_change"::text FROM "geofachdaten"."gis_digi_a_geo" WHERE ("gid" = 'nextval(''gis_digi_a_geo_gid_seq''::regclass)') LIMIT 1 returned 7 [ERROR: invalid input syntax for integer: »nextval('gis_digi_a_geo_gid_seq'::regclass)«
LINE 1: ...OM "geofachdaten"."gis_digi_a_geo" WHERE ("gid" = 'nextval('...
This significantly impairs the workflow during digitization.
#3 Updated by Harrissou Santanna almost 6 years ago
What happens if "evaluate default values on provider side" is checked in the project settings, as suggested in #20431?
#4 Updated by Jan Lippmann almost 6 years ago
#5 Updated by Harrissou Santanna almost 6 years ago
- Related to Bug report #20431: no possibility to confirm in the attribut form while add more than one feature (postgres) added
#6 Updated by Alessandro Pasotti almost 6 years ago
#7 Updated by David Signer almost 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|32b7d7e5ddeef7a66592267819e234085c44a7bc.