Bug report #16552

Inserting data on version views not working in 2.18 (OK in 2.14)

Added by Paolo Cavallini about 2 years ago. Updated about 2 years ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:2.18.7 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24458

Description

  • create a PostGIS DB
  • create a simple geometric table
  • DB Manager > Table > Verioning
  • add the view to the canvas
  • start editing
  • insert a feature
  • Commit errors:
ERROR: 1 feature(s) not added.
Provider errors:
PostGIS error while adding features: ERRORE:  non è possibile eseguire INSERT RETURNING sulla relazione "version_current" 
NOTA: È necessaria una regola ON INSERT DO INSTEAD non condizionale con una clausola RETURNING.

Which translates approx to:

ERROR: cannot perform
INSERT RETURNING on relation "version_current" 
HINT: You need an unconditional ON INSERT DO INSTEAD rule with a
RETURNING clause.

The same operation on the same view works smoothly on QGIS 2.14.


Related issues

Related to QGIS Application - Bug report #16083: problem with ON INSERT TO ... DO INSTEAD postgres rules Closed 2017-01-16

History

#1 Updated by Giovanni Manghi about 2 years ago

  • Priority changed from Normal to High

#2 Updated by Jürgen Fischer about 2 years ago

  • Resolution set to duplicate

#3 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Open to Closed

#4 Updated by Jürgen Fischer about 2 years ago

  • Status changed from Closed to Open
  • Resolution deleted (duplicate)

#5 Updated by Jürgen Fischer about 2 years ago

  • Related to Bug report #16083: problem with ON INSERT TO ... DO INSTEAD postgres rules added

#6 Updated by Jürgen Fischer about 2 years ago

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

Fixed in 8b263e4cc and 3f7f95ee2

Also available in: Atom PDF