[QGIS-Developer] DBManager TopoViewer silently fails to load edge/node layers

Sandro Santilli strk at kbt.io
Wed Aug 21 06:32:52 PDT 2019


It's been a long time but I just clean-built QGIS from master branch
(commit 8145f8f9276bb0b71ffb076e9b4115d800c41747) to find that the
TopoViewer of DBManager is failing to provide proper layers.

The TopoViewer creates a layer tree composed by a top group
named after the target topology and 3 sub-groups:

   - Faces
     - face_mbr
     - face
     - face_seed
   - Nodes
     - node
     - node_id
   - Edges
     - edge
     - directed_edge
     - edge_id

Of the 8 layers, only the ones under "Faces" work, while the others
not only don't show anything but do not even present the user with
a right-click->Properties (or double-click) menu to inspect
properties. The right-click menu shows only a few entries
(copy layer, rename layer, duplicate layer) and show no geometry type.

Do you have any idea what could cause this ?

The logs, for one of the layers, report:

	src/providers/postgres/qgspostgresprovider.cpp:100 : (QgsPostgresProvider) [3ms] URI: dbname='p' port=5432 key='edge_id' estimatedmetadata=true srid=4167 type=LineString checkPrimaryKeyUnicity='1' table="test0"."edge_data" (geom) sql=
	src/providers/postgres/qgspostgresprovider.cpp:149 : (QgsPostgresProvider) [0ms] Connection info is dbname='p' port=5432
	src/providers/postgres/qgspostgresprovider.cpp:150 : (QgsPostgresProvider) [0ms] Geometry column is: geom
	src/providers/postgres/qgspostgresprovider.cpp:151 : (QgsPostgresProvider) [0ms] Schema is: test0
	src/providers/postgres/qgspostgresprovider.cpp:152 : (QgsPostgresProvider) [0ms] Table name is: edge_data
	src/providers/postgres/qgspostgresprovider.cpp:153 : (QgsPostgresProvider) [1ms] Query is: "test0"."edge_data"
	src/providers/postgres/qgspostgresprovider.cpp:154 : (QgsPostgresProvider) [0ms] Where clause is:
	src/providers/postgres/qgspostgresconn.cpp:168 : (connectDb) [0ms] Using cached connection for dbname='p' port=5432
	src/providers/postgres/qgspostgresprovider.cpp:1145 : (hasSufficientPermsAndCapabilities) [0ms] Checking for permissions on the relation
	src/providers/postgres/qgspostgresprovider.cpp:3526 : (getGeometryDetails) [0ms] Getting geometry column: SELECT upper(type),srid,coord_dimension FROM geometry_columns WHERE f_table_name='edge_data' AND f_geometry_column='geom' AND f_table_schema='test0'
	src/providers/postgres/qgspostgresprovider.cpp:3528 : (getGeometryDetails) [1ms] Geometry column query returned 1 rows
	src/providers/postgres/qgspostgresprovider.cpp:3769 : (getGeometryDetails) [1ms] Detected SRID is 4167
	src/providers/postgres/qgspostgresprovider.cpp:3770 : (getGeometryDetails) [0ms] Requested SRID is 4167
	src/providers/postgres/qgspostgresprovider.cpp:3771 : (getGeometryDetails) [0ms] Detected type is 2
	src/providers/postgres/qgspostgresprovider.cpp:3772 : (getGeometryDetails) [0ms] Requested type is 2
	src/providers/postgres/qgspostgresprovider.cpp:3780 : (getGeometryDetails) [0ms] Spatial column type is Geometry
	src/providers/postgres/qgspostgresprovider.cpp:747 : (loadFields) [0ms] Loading fields for table edge_data
	src/providers/postgres/qgspostgresprovider.cpp:1344 : (determinePrimaryKey) [2ms] Checking whether SELECT count(*) FROM pg_inherits WHERE inhparent='"test0"."edge_data"'::regclass is a parent table
	src/providers/postgres/qgspostgresprovider.cpp:1349 : (determinePrimaryKey) [0ms] Retrieving first primary or unique index: SELECT indexrelid FROM pg_index WHERE indrelid='"test0"."edge_data"'::regclass AND (indisprimary OR indisunique) ORDER BY CASE WHEN indisprimary THEN 1 ELSE 2 END LIMIT 1
	src/providers/postgres/qgspostgresprovider.cpp:1352 : (determinePrimaryKey) [1ms] Got 1 rows.
	src/providers/postgres/qgspostgresprovider.cpp:1442 : (determinePrimaryKey) [0ms] Retrieving key columns: SELECT attname,attnotnull FROM pg_index,pg_attribute WHERE indexrelid=14313569 AND indrelid=attrelid AND pg_attribute.attnum=any(pg_index.indkey)
	src/providers/postgres/qgspostgresprovider.cpp:1444 : (determinePrimaryKey) [0ms] Got 1 rows.


--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   https://strk.kbt.io/services.html


More information about the QGIS-Developer mailing list