Bug report #763

Problem editing a postgis table

Added by leo-lami - over 16 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Digitising
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10822

Description

Trying to edit a a postgis-table. This seems to work as expected inside the GUI, but after deleting the layer, reload it, the datas do not appear changed.

The first time that I made the test, whn I click on 'Stop editing' QGIS say:

The PostgreSQL database returned: ERROR: syntax error at or near "="
LINE 1: UPDATE "public"."rm98_2007_lin" SET ='34455' WHERE "gid"=1
^
Durante la prova: UPDATE "public"."rm98_2007_lin" SET ='34455' WHERE "gid"=1

I think the problem is in the double quotes: "public"."rm98_2007_lin".

Associated revisions

Revision 66d22b1e
Added by Jürgen Fischer over 16 years ago

attribute table: add attributes before applying attribute changes, fixes #763

please test

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7642 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision c32914f5
Added by Jürgen Fischer over 16 years ago

attribute table: add attributes before applying attribute changes, fixes #763

please test

git-svn-id: http://svn.osgeo.org/qgis/trunk@7642 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by leo-lami - over 16 years ago

Linux and Windows platform

#2 Updated by Marco Hugentobler over 16 years ago

The problem is not the double quote.
For some reason, qgis does not find the proper fieldname.

UPDATE "public"."rm98_2007_lin" SET ='34455' WHERE "gid"=1

should be:

UPDATE "public"."rm98_2007_lin" SET <fieldname>='34455' WHERE "gid"=1

Marco

#3 Updated by Marco Hugentobler over 16 years ago

A part of this problem is fixed in . QGIS should now find the field name. However, it is still a problem to add new attribute fields to the table and insert/change values in these new fields in one go, because the names of the new fields are still unknown to the provider. This needs more work.

#4 Updated by Jürgen Fischer over 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in c32914f5 (SVN r7643)

#5 Updated by Anonymous over 14 years ago

Milestone Version 0.9.1 deleted

Also available in: Atom PDF