Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS: 0 is wrote instead of "null" #20005

Closed
qgib opened this issue Dec 1, 2014 · 2 comments
Closed

PostGIS: 0 is wrote instead of "null" #20005

qgib opened this issue Dec 1, 2014 · 2 comments
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Dec 1, 2014

Author Name: Seb Radzimski (Seb Radzimski)
Original Redmine Issue: 11777
Affected QGIS version: 2.6.1
Redmine category:attribute_table


Hi.
While working with QGIS 2.6 and Postgres/Postgis 9.3/2.1 on Ubuntu (or 9.1/1.5 on Windows) I found a bug.
I have to explain that on a simple table like:

CREATE TABLE test ( gid serial NOT NULL, "int" integer, "real" real, "double" double precision, "text" text, the_geom geometry, CONSTRAINT test_pkey PRIMARY KEY (gid ) )

When I add first object (in QGIS) without any data (every attribute is null, except of gid) and I save it, all of them will be null in database. So far so good!
If I add a second object (without any data) and third one (with int=1, real=2 double=3) and save it, attributes of previus object (second one) will be 0 instead of null. If you would check attributes of second object before saving into database, QGIS show them as null. But while saving QGIS sends 0 instead of null to the database attributes of second object. It happens every time when attribute (integer, real, double) has been changed.
I belive I don't have to explain how big is the difference between 0 and null value ;) Because of that error it is impossible to use constraints in database to keep data in right order.
I have check that sytuation on QGIS 2.0/2.2 and there was no problem. It starts in 2.4...

@qgib
Copy link
Contributor Author

qgib commented Dec 2, 2014

Author Name: Giovanni Manghi (@gioman)


confirmed here as a regression.


  • version was changed from 2.6.0 to 2.6.1
  • os_version was changed from 7,8 / 12.04 to
  • operating_system was changed from Windows/Ubuntu to
  • priority_id was changed from Normal to Severe/Regression
  • subject was changed from 0 instead of null to PostGIS: 0 is wrote instead of "null"

@qgib
Copy link
Contributor Author

qgib commented Jan 16, 2015

Author Name: Jürgen Fischer (@jef-n)


Fixed in changeset "03713ce65668bfb7e7ce4bcde06a26746ab1b352".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Attribute Table labels May 25, 2019
@qgib qgib added this to the Version 2.8 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant