Opened 16 years ago

Closed 16 years ago

Last modified 15 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 by msieczka, 16 years ago

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 by jef, 16 years ago

Owner: changed from nobody to jef

comment:3 by jef, 16 years ago

Resolution: fixed
Status: newclosed

fixed in r8356

comment:4 by (none), 15 years ago

Milestone: Version 0.9.2

Milestone Version 0.9.2 deleted

Note: See TracTickets for help on using tickets.