Bug report #835

Qgis assertion when loading a postgres layer when the postgis extent() function is missing

Added by Gavin Macaulay - over 15 years ago. Updated almost 14 years ago.

Assignee:Gavin Macaulay -
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10894


Qgis crashes (with an assertion) when loading a postgres layer when the postgis extent() function is missing. This is clearly a problem with the setup of the database, but qgis could be a bit more robust with unexpected behaviour from postgres.

Debug: qgspostgresprovider.cpp: 2526: (calculateExtents)
+++++++++QgsPostgresProvider::calculateExtents -  Getting extents using
schema.table: select extent("trackline") from "public"."t_station" 
Fatal: ASSERT: "PQntuples(result) == 1" in file qgspostgresprovider.cpp,
line 2529

and a similar query from psql:
omandb=# select extent(trackline) from t_station;
ERROR:  function extent(geometry) does not exist
HINT:  No function matches the given name and argument types. You may
need to add explicit type casts.


#1 Updated by Gavin Macaulay - over 15 years ago

  • Status changed from Open to In Progress

#2 Updated by Jürgen Fischer over 15 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

fixed in bd35aecf (SVN r7662)

#3 Updated by Anonymous almost 14 years ago

Milestone Version 0.9.1 deleted

Also available in: Atom PDF