Bug report #13546
qgis trying to update first empty text row with null in db
| Status: | Closed | ||
|---|---|---|---|
| Priority: | Normal | ||
| Assignee: | |||
| Category: | Attribute table | ||
| Affected QGIS version: | 2.10.1 | Regression?: | No |
| Operating System: | win 7 | Easy fix?: | No |
| Pull Request or Patch supplied: | No | Resolution: | |
| Crashes QGIS or corrupts data: | No | Copied to github as #: | 21588 |
Description
I have Postgresql table
CREATE TABLE test_qgis(
id serial NOT NULL,
"colText" text,
"colChar" character varying(300),
"GEOM" geometry(Point,4326),
CONSTRAINT test_qgis_pkey PRIMARY KEY (id)
)WITH (OIDS=FALSE);
INSERT INTO test_qgis("colText", "colChar", "GEOM") VALUES ('', '', st_setSrid(st_point(20,30),4326));
INSERT INTO test_qgis("colText", "colChar", "GEOM") VALUES ('', '', st_setSrid(st_point(30,10),4326));
- Open table with qgis
- Open Attribute table
- Toggle editing mode ON
colText and colChar became 'NULL' in first row - Toggle editing mode OFF
qgis asks to "Save Changes"
this bug doesn't appear when column type "character"
Associated revisions
editor widget: don't reset empty strings to null, if default value is null (fixes #13546)
History
#1
Updated by zimirrr leonid about 10 years ago
*this bug doesn't appear when column type "character"
#2
Updated by Paolo Cavallini about 10 years ago
- Subject changed from qgis trying to update first emty text row with null in db to qgis trying to update first empty text row with null in db
#3
Updated by Jürgen Fischer about 10 years ago
- Assignee set to Jürgen Fischer
#4
Updated by Jürgen Fischer about 10 years ago
- Status changed from Open to Closed
Fixed in changeset 3beaed9fa1a8100973cd9c5a94119dc6986a5649.