Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS 3.4 Incorrect handling of Postgres serial columns #28217

Closed
qgib opened this issue Nov 7, 2018 · 7 comments
Closed

QGIS 3.4 Incorrect handling of Postgres serial columns #28217

qgib opened this issue Nov 7, 2018 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Nov 7, 2018

Author Name: Scott Werkema (@ScottWerkema)
Original Redmine Issue: 20397
Affected QGIS version: 3.4.0
Redmine category:data_provider/postgis


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 issue(s): #28251 (relates)
Redmine related issue(s): 20431


@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2018

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Normal to High
  • operating_system was changed from macOS 10.14.1 to

@qgib
Copy link
Contributor Author

qgib commented Nov 16, 2018

Author Name: Burghardt Scholle (Burghardt Scholle)


I can confirm your description with QGIS DEV code revision 7cce9b3. 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.

@qgib
Copy link
Contributor Author

qgib commented Nov 16, 2018

Author Name: Harrissou Santanna (@DelazJ)


What happens if "evaluate default values on provider side" is checked in the project settings, as suggested in #28251?

@qgib
Copy link
Contributor Author

qgib commented Nov 16, 2018

Author Name: Jan Lippmann (@j-lippmann)


see also here #28251

when you hide the serial field in the form you can add more than one feature without save each feature

BUT then you can run into this issue: #28253

@qgib
Copy link
Contributor Author

qgib commented Nov 17, 2018

Author Name: Harrissou Santanna (@DelazJ)


@qgib
Copy link
Contributor Author

qgib commented Nov 17, 2018

Author Name: Alessandro Pasotti (@elpaso)


Most likely broken by 963fdd5#diff-ad7e488f21bc920cdf5407f3b17f5c42

@qgib
Copy link
Contributor Author

qgib commented Nov 20, 2018

Author Name: David Signer (@signedav)


Applied in changeset 32b7d7e.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Nov 20, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Data Provider Related to specific vector, raster or mesh data providers Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant