Bug report #131
PostGIS digitizing
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Gary Sherman | ||
Category: | Vectors | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 10190 |
Description
When committing PostGIS digitizing changes to database, in case of even a single error in input (value not allowed) all the editing is lost. Too bad for serious work.
History
#1 Updated by Brendan Morley - over 18 years ago
Can you provide an example where "value not allowed" occurs?
There are always going to be cases where there may be an error when committing (e.g. disk full, server fallen off network) - perhaps we could do a "save changes but keep editing" feature?
#2 Updated by venturato-faunalia-it - over 18 years ago
1 example: ERROR: insert or update on table "fix_2006" violates foreign key constraint "verifica_id_radio"
DETAIL: Key (id_radio,anno)=(1000,2006) is not present in table "radio_usate".
2 example: ERROR: date/time field value out of range:"31/2/2006".
"save changes but keep editing" might be good, but I think it is better if qgis could keep it im memory, asking the user to edit the wrong value.
#3 Updated by Brendan Morley - over 18 years ago
- Status changed from Open to In Progress
I see where the problem is and have devised a potential fix on my machine. I'll commit it to subversion in the next few days and let you see if it works for you.
#4 Updated by Brendan Morley - over 18 years ago
Should be fixed in 4a6923ac (SVN r5592) for both changed attribute values and changed geometries. Can this be tested and the bug closed if appropriate?
#5 Updated by Redmine Admin over 18 years ago
The following error now appears (twice) when committing:
ERROR: syntax error at or near "," at character 318
From the database side, we get:
WARNING: non c'è nessuna transazione in corso
and then:
ERROR: current transaction is aborted, commands ignored until end of transaction block
As a result, no data can be input.
#6 Updated by Gavin Macaulay - over 18 years ago
- Resolution set to fixed
- Status changed from In Progress to Closed
The syntax error problem has been fixed in SVN 986ea537 (SVN r5638). Was a problem with blank data fields.
#7 Updated by Brendan Morley - over 18 years ago
Further to my commentary on 07/14/06, I got to test it out and it was found wanting. should really fix it, I have put a full writeup on the commit message to .
#8 Updated by venturato-faunalia-it - over 18 years ago
- Resolution deleted (
fixed) - Status changed from Closed to Feedback
Further testing: the situation is already much better than before, but in my view the correct behaviour would be for the program to stop and display the alphanumumeric digitizing window of the wrong record, so that the user could put the correct values.
Admittedly, in case of errors in multiple records this would be difficult to implement. Perhaps better to automatically commit every record just after insertion?
Additionally, we get frequent crashes while digitizing.
#9 Updated by Gavin Macaulay - over 18 years ago
Can you provide a gdb backtrace for when it crashes please. Perhaps it is related to ticket #155?
#10 Updated by Brendan Morley - over 18 years ago
- Status changed from Feedback to Open
The kind of refinement described in 08/29/06 15:53:14 is no longer a trivial change, and so I will push back that aspect of it to a post-0.8 timeframe.
Even then it would be fairly difficult to address any more than the first error in a commit. Maybe for each change, the postgres provider could do a BEGIN / UPDATE x where y / ROLLBACK sequence (testing to see if the UPDATE worked but without committing the change), but this would be unique to the postgres provider.
Therefore an architectural approach should be made to this instead of a quick fix.
#11 Updated by Jürgen Fischer almost 17 years ago
- Status changed from Open to Closed
- Resolution set to fixed
seems this was reintroduced at some point, but:
Editing is not stopped when a commit failure happens and the data is therefore not lost (fixed in c65aee64 (SVN r8211)).
If the commit failure is caused by invalid values (e.g. strings in a numeric column) you can correct them in the attribute table and retry the commit afterwards (fixed in bd9f43f1 (SVN r8212)).
#12 Updated by Anonymous over 15 years ago
Milestone Version 0.9.2 deleted