Bug report #2681
type and srid of geometry column not found using custom query (postgres provider) with no results
|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|
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.
#1 Updated by Giuseppe Sucameli over 11 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