Bug report #4851

Postgres/Postgis provider malfunction - unable to read spatial tables

Added by Alessandro Ciali almost 9 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System:Win Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:14685

Description

Trying to load spatial tables in Qgis master 1.7.90-42 (3e91332) via Postgis provider return this error in log windows:

Unable to get feature type or srid for the_geom of "risorse_idriche"." 
DBRIP_conc_idro_p" 

dbname='ambiente' host=localhost port=5432 user='postgres' password='cb1972' 
sslmode=disable srid=26591 type=Point table="risorse_idriche"." 
DBRIP_conc_idro_p" (the_geom) sql= is an invalid layer - not loaded

POSTGRES LOG
Errornous query: SELECT upper(type),srid FROM geography_columns WHERE 
f_table_name='DBRIP_conc_idro_p' AND f_geography_column='the_geom' AND 
f_table_schema='risorse_idriche' returned 7 [ERROR:  relation 
"geography_columns" does not exist
LINE 1: SELECT upper(type),srid FROM geography_columns WHERE f_table...
                                     ^
]

Failed to get geometry details for PostGIS column DBRIP_conc_idro_p.the_geom.

The CREATE Code for the table is:

CREATE TABLE risorse_idriche."DBRIP_conc_idro_p" 
(
  "PKUID" integer NOT NULL DEFAULT nextval('risorse_idriche."DBRSP_conc_idro_p_gid_seq"'::regclass),
  id_pzo character varying(80),
  the_geom geometry,
  CONSTRAINT "DBRSP_conc_idro_p_pkey" PRIMARY KEY ("PKUID"),
  CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text OR the_geom IS NULL),
  CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 26591)
)
WITH (
  OIDS=FALSE
);
CREATE INDEX "DBRSP_conc_idro_p_the_geom_gist" 
  ON risorse_idriche."DBRIP_conc_idro_p" 
  USING gist
  (the_geom);

This table is perfectly read and represented by QGis 1.7.3 and master 1.90.90 (1816274).
Postgres 8.4 and Postgis 1.4

History

#1 Updated by Jürgen Fischer almost 9 years ago

  • Assignee set to Jürgen Fischer

please verify that the problem is still there in current master.

#2 Updated by Giovanni Manghi almost 9 years ago

  • Status changed from Open to Feedback

#3 Updated by Alessandro Ciali almost 9 years ago

Still present in the latest version downloadable by OSGeo4w-setup.exe for Win (1.9.90-42 - 2d8b1ab)
I will try for future updates when possible

#4 Updated by Miha Požauko almost 9 years ago

I came across the same problem as Alessandro described.

#5 Updated by Sai Nerella almost 9 years ago

I have a similar problem. The version I downloaded using OSGeo4w-setup.exe is (1.9/90-alpha QGIS code revision: dbe6497)

I had a saved QGIS project with Postgis layers which stopped working with the above release.

#6 Updated by Jürgen Fischer over 8 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

should work in current master (both versions tried after my plea to try master, were older than master at that point).

Also available in: Atom PDF