Bug report #13638

Cannot load empty Postgis views

Added by Andreas Neumann almost 4 years ago. Updated almost 4 years ago.

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

Description

Current master cannot load empty Postgis views (=view with no records), even if the user selects a primary key column.

The error message is that "PostgreSQL layer has no primary key". Note that I did select a correct and valid primary key manually.

If one loads an existing project with a reference to an empty Postgis view, the layer appears as "Missing layer".

This is a regression and worked in previous versions.

Thank you for having a look at it.

Associated revisions

Revision 441f6f8c
Added by Jürgen Fischer almost 4 years ago

postgres provider: allow detection of empty views (fixes #13638)

History

#1 Updated by Jürgen Fischer almost 4 years ago

  • Status changed from Open to Closed

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

  • Subject changed from Cannot load emptry Postgis views to Cannot load empty Postgis views

Also available in: Atom PDF