Bug report #6510

PostGIS tables with both a Geometry and a TopoGeometry column

Added by Sandro Santilli over 11 years ago. Updated over 11 years ago.

Assignee:Sandro Santilli
Category:Data Provider/PostGIS
Affected QGIS version:1.8.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:15727


When a PostGIS table has both a geometry and a topogeometry column qgis only sees the geometry column.
To reproduce:

 CREATE TABLE t (g geometry, tg topogeometry);
 CREATE TABLE t2 (tg topogeometry);

Then "Add PostGIS layer", find the "t" table and you'll only see the "g" column, find the "t2" table and you'll see the "tg" column.
I've also tried to switch the order in which topogeometry and geometry columns are added but it's still only the geometry that gets considered when both are available.

May be related to #4532 but I'm not sure yet


#1 Updated by Sandro Santilli over 11 years ago

Note that if geometry_columns lookup fails (I temporarly renamed it for testing it) then both columns are shown.
It's a case of metadata lookup automatically becoming authoritative, triggering skipping of further lookup.
This is also when the "only check geometry_columns" option is unselected.

So yes I confirm it is related with #4532

#2 Updated by Sandro Santilli over 11 years ago

  • Affected QGIS version changed from master to 1.8.0
  • Assignee set to Sandro Santilli

1.8.0 is also affected. I'm working on a fix for master.

#3 Updated by Sandro Santilli over 11 years ago

  • % Done changed from 0 to 90
  • Pull Request or Patch supplied changed from No to Yes

Will be fixed in master by pulling this: https://github.com/qgis/Quantum-GIS/pull/291
I could work on backporting to 1.8.0 branch if you see fit.

#4 Updated by Sandro Santilli over 11 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed
  • % Done changed from 90 to 100

Patch pulled in master. Thanks jef!

Also available in: Atom PDF