Opened 15 years ago
Closed 15 years ago
Last modified 14 years ago
#933 closed bug (fixed)
a string instead of a number in digitiser and table editor is not handled
|Reported by:||msieczka||Owned by:||jef|
|Priority:||major: does not work as expected||Milestone:|
|Must Fix for Release:||Yes||Platform:||Debian|
|Platform Version:||Awaiting user input:||no|
Digitising, PostGIS case:
- Digitise a feature in PostGIS layer entering a string in a numeric column (human error). Press OK. QGIS accepts this. It shouldn't.
- Digitise a few more, no errors. Say it took you half an hour. Toggle editing off, save changes. An error pops up:
ERROR: invalid input syntax for integer: "the string you entered in error instead of number"
You can't save changes. Beacause of one un-handled error all digitising has to be re-done.
Table editing, PostGIS case:
- Add a PostGIS layer which has a numeric field.
- In table editor "Start editing", enter a string instead of number in one row (human error). QGIS allows this - it shouldn't. Edit several other (correctly this time). Stop editing, save - error:
The PostgreSQL database returned: ERROR: invalid input syntax for integer: "huha" When trying: UPDATE "public"."layer1" SET huha='huha' WHERE "gid"=
Again, you can't save changes. Beacause of one un-handled error editing has to be re-done.
Digitising, shapefile case:
- Digitise a feature in a shapefile layer entering a string in a numeric column (human error). Press OK. QGIS accepts this. It shouldn't.
- Digitise a few more, not making errors. Toggle editing off, save changes. Saved OK. Check the table - the row where you made an error is "0". This is not correct to silently force an arbitrary value when a string instead of number is given. The error should handled.
Editing table, shapefile case:
QGIS behaves the same like described above - forces an arbitrary value when a string instead of number is given, which is not right.
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
comment:3 by , 15 years ago
|Status:||new → closed|
fixed in r8356
comment:4 by , 14 years ago
Milestone Version 0.9.2 deleted
Note: See TracTickets for help on using tickets.
After some recent Jurgen's fixes it is now possible to correct an invalid field that prevents comitting changes, *during* digitizing, in the table editor, in case of PostGIS layers. So it is not *that* bad now for PostGIS.
However, the silent data corruption in case of editing Shapefiles still takes place, as described above.