-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
regression: field calculator not updating PostGIS layers #19836
Comments
Author Name: Giovanni Manghi (@gioman) Just tested here, both on Linux and Windows, qgis 2.6/master using a remote postgis server, no issues: changes shows immediately in the table of attributes (unless you reordered one of the fields, known issue and regression) and saving edits works fine (close and reopen the table and new values are there).
|
Author Name: Gavin Fleming (@gubuntu)
|
Author Name: Gavin Fleming (@gubuntu) several users on windows working on the same database in an office LAN environment have reported the same issue. I just tested and confirmed it on Linux over the Internet. |
Author Name: Giovanni Manghi (@gioman) Gavin Fleming wrote:
may be an issue with the permissions in the database?
|
Author Name: Gavin Fleming (@gubuntu) no I tested as superuser on the same layer filtered to one record. The only difference was the QGIS version.
|
Author Name: Giovanni Manghi (@gioman) Gavin Fleming wrote:
as I cannot replicate in any way i leave this open so others would be able to give it a try and leave feedback. PS
|
Author Name: Tim Sutton (Tim Sutton) Giovanni Manghi wrote:
I was able to replicate here against Gavin's db. Under QGIS 2.6 the following simple expression fails to update existing field:
Under 2.4 this works:
|
Author Name: Gavin Fleming (@gubuntu)
|
Author Name: Tim Sutton (Tim Sutton) I just tested using the python API:
And that works fine, so the issue must lie in the caclulator itself. |
Author Name: Giovanni Manghi (@gioman)
so it is just this particular expression (concatenation with the "+") that fails or any expression fails? and then: it fails on any database or just one? and what about other formats? I tested here on local and remote databases, with qgis 2.6 and master and both ways to do concatenation (|| and +) are working as expected from the field calculator. |
Author Name: Gavin Fleming (@gubuntu) the concatenation is a red herring :-) - any expression fails. Remote vs local might be a red herring too. |
Author Name: Giovanni Manghi (@gioman)
I does not seems postgresql version either. I just installed postgresql 9.1/postgis 2 and tested with qgis 2.6 and all works as expected.
|
Author Name: Wille Marcel (Wille Marcel) I have the same issue. When I open the table of attributes, choose to just show the selected items and modify a field value using the toolbar of the table of attributes dialog, it works fine. But when I open the field calculator dialog and try to modify some values, it didn't apply the modifications. Tim Sutton wrote:
|
Author Name: Giovanni Manghi (@gioman) Wille Marcel wrote:
always? or just in same situation as #19808? because for normally imported vectors then is works as expected... |
Author Name: Wille Marcel (Wille Marcel) Only with postgis. When editing vector files it works properly. Giovanni Manghi wrote:
|
Author Name: Giovanni Manghi (@gioman) Wille Marcel wrote:
yes, but the ticket I linked to you is about (and this one too) is about postgis tables (layers) created in a specific way. If you import a vector (shape, whatever) into postgis using qgis (db manager, browser. etc), shp2pgsql, ogr2ogr, etc. then this does not happens, or at least I can't confirm in any test I made so far. |
Author Name: Wille Marcel (Wille Marcel) I tried it in a OSM database created with osm2pgsql and in a database with all the vectors created using qgis. In both the error occurs. Giovanni Manghi wrote:
|
Author Name: Giovanni Manghi (@gioman) Wille Marcel wrote:
can you attach a dump of one of the table that has the issue? |
Author Name: Gavin Fleming (@gubuntu) appears to be fixed in master. The value updates in the table, detects that there are changes and saves, i.e. as expected. Database and PostGIS version and test data are the same as those that had this issue with 2.6 and earlier versions of master. |
Author Name: Gavin Fleming (@gubuntu)
Original Redmine Issue: 11574
Affected QGIS version: 2.6.0
Redmine category:field_calculator
Try to update a field in a (remote) PostGIS layer using the field calculator and no visible change occurs, neither does the layer pick up that there are any changes to save.
I have tested this on the same record from the same database and it works in 2.4 and fails in 2.6 and master.
The one that does not work in 2.6 but does work in 2.4 happens to be on a remote host and PostgreSQL 9.1, PostGIS 2.1
2.6 however does work on local host PostgreSQL 9.3 PostGIS 2.1.
The expression I used was simply assigning a new string in ''
Related issue(s): #19808 (relates)
Redmine related issue(s): 11538
The text was updated successfully, but these errors were encountered: