Opened 13 years ago

Closed 12 years ago

Last modified 11 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:
Component: Vectors Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: Debian
Platform Version: Awaiting user input: no

Description

Digitising, PostGIS case:

  1. Digitise a feature in PostGIS layer entering a string in a numeric column (human error). Press OK. QGIS accepts this. It shouldn't.
  1. 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:

  1. Add a PostGIS layer which has a numeric field.
  1. 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:

  1. Digitise a feature in a shapefile layer entering a string in a numeric column (human error). Press OK. QGIS accepts this. It shouldn't.
  1. 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 Changed 12 years ago by msieczka

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.

comment:2 Changed 12 years ago by jef

Owner: changed from nobody to jef

comment:3 Changed 12 years ago by jef

Resolution: fixed
Status: newclosed

fixed in r8356

comment:4 Changed 11 years ago by (none)

Milestone: Version 0.9.2

Milestone Version 0.9.2 deleted

Note: See TracTickets for help on using tickets.