Bug report #2681

type and srid of geometry column not found using custom query (postgres provider) with no results

Added by Giuseppe Sucameli over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Data Provider
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 #:12741

Description

This is the message I get if I use a custom query with no results.

Quantum GIS was unable to determine the type and srid of column geom in (SELECT * FROM "public"."_ctr2k_av" AS "t_0") as "subQuery_0". The database communication log was:

I get no errors if I insert that layer from QGis GUI because if I not use a custom query the provider retrieve type and srid by the entry in geometry_columns.

patch01.diff Magnifier - patch (2.97 KB) Giuseppe Sucameli, 2010-04-28 03:09 AM

Associated revisions

Revision ebc93b72
Added by Jürgen Fischer over 10 years ago

fix #2681

git-svn-id: http://svn.osgeo.org/qgis/trunk/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 7b48ca7b
Added by Jürgen Fischer over 10 years ago

fix #2681

git-svn-id: http://svn.osgeo.org/qgis/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Giuseppe Sucameli over 10 years ago

The patch contains:

- the real patch to resolve this issue

- 2 query combined into one (to make the code run faster)

- and 2 little fixes (because 0 is defined as InvalidOid)

Please, when apply the patch to the trunk add at the end of the commit message this text

[RT-SIGTA] 

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

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

fixed in 7b48ca7b (SVN r13407).

Also available in: Atom PDF