Bug report #5964

ODBC access can't read geometric data and other minor bugs

Added by Regis Haubourg over 12 years ago. Updated almost 12 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
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

Description

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

postgresql-2012-07-06_110905.log Magnifier (1.86 MB) Regis Haubourg, 2012-07-06 06:31 AM

History

#1 Updated by Jürgen Fischer over 12 years ago

with "odbc access" you're referring to the ODBC tab in "Add vector layer" (ie. OGR provider), aren't you? Why aren't you using "Add PostGIS layer"?

#2 Updated by Regis Haubourg over 12 years ago

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?

#3 Updated by Jürgen Fischer over 12 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. trac.osgeo.org/gdal).

#4 Updated by Regis Haubourg over 12 years ago

OK thanks,
I'll have a look there.
Régis

#5 Updated by Paolo Cavallini over 12 years ago

  • Target version set to Version 2.0.0

#6 Updated by Regis Haubourg almost 12 years ago

  • Status changed from Open to Closed

now we have a oracle driver... the need falls.

Also available in: Atom PDF