Bug report #9738

updatable view QGIS 2.2.0

Added by Sylvia Preuss about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:High
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:2.2.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:18290

Description

I added the view qry_alles to my qgis-project. I chose edit mode and created a new object. I saved it into PostGIS database. Now I want to make changes on my object, but it's not possible to UPDATE or DELETE it, or change an attribute into the database. The view consists of two tables which should be updated by rules and functions.

For testing you can use QGIS 1.7.4 or lower, everything is working as it's supposed to. So you can see how it should work. But with the new QGIS-versions 2.0.1 and 2.2.0 it's not working anymore.
The attributes "objekt" and "merkmal1" are the same and "merkmal5" are used for joining the tables.

PostgreSQL 8.1.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.0 (SUSE Linux)
PostGIS 1.3
QGIS 2.2.0 on Windows7

I added three test-datasets and all sql-statements you need for the example.

flaechen.sql - first table with geometry-table (8.5 KB) Sylvia Preuss, 2014-03-07 02:51 AM

func_del_alles.sql - function for rule on view used for DELETE (460 Bytes) Sylvia Preuss, 2014-03-07 02:51 AM

func_upd_alles.sql - function for rule on view used for UPDATE (2.2 KB) Sylvia Preuss, 2014-03-07 02:51 AM

merkmale.sql - second table with attributes according to the first table (7.49 KB) Sylvia Preuss, 2014-03-07 02:51 AM

qry_alles.sql - view for both tables (3.23 KB) Sylvia Preuss, 2014-03-07 02:51 AM

Associated revisions

Revision 7f6663a8
Added by Jürgen Fischer about 10 years ago

postgres: also accept PGRES_TUPLES_OK as positive result for UPDATE/DELETE/INSERT (fixes #9738)

History

#1 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF