Bug report #5964
ODBC access can't read geometric data and other minor bugs
|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 #:||15384|
On QGIS 1.8 and current master (72d7a23), postgres 9.1 and postgis 1.5.
odbc acces sees table and views but can't find geometry type or column. Only attribute data can be read.
Logging QGIS queries from postgres, I have seen some possibles bugs.
- Geometry columns retrieving query is broken :
SELECT f_table_name, f_geometry_column, geometry_type FROM geometry_columns'
should be (postgis 1.5)
SELECT f_table_name, f_geometry_column, type FROM geometry_columns
- First table in list is queried 3 to 4 times with 'SELECT * FROM ' when building table list dialog.
- Choosing a table to add in QGIS sends several identical queries (3 to 26) with SELECT *
- many queries to retrieve fields seem duplicated and retrieve no content. Performance tuning possible here maybe.
- Finally, ODBC table has an image icon in Layer Panel. It should be either attribute table icon or geographic layer icon depending on geometrytype
See attached script for details
#3 Updated by Jürgen Fischer over 7 years ago
regis Haubourg wrote:
Mm.. good question. This is the only database on wich I have admin rights. The goal is to read Oracle database. Is the provider working the same way?
No, there's no native qgis oracle (spatial) provider yet (but it should be available soon). The postgres provider shouldn't have the problems you describe.
Anyway, if this is a OGR problem (
ogrinfo probably produces a similar log), this should be taken upstream (ie.