[Qgis-user] not accessible tables found problem

Jürgen E. Fischer jef at norbit.de
Thu Apr 16 09:58:26 PDT 2009


Hi Martin,

On Thu, 16. Apr 2009 at 17:50:22 +0200, Martin Landa wrote:
> I have problem with connecting PostGIS database. 'Test connection'
> works fine, but when I try to connect to the database (read
> geometry_columns table) I get the error 'Not accessible tables found'.
> >From console it works
> 
> psql pgis_student -U postgis -W
> 
> pgis_student=> \z geometry_columns
>                Access privileges for database "pgis_student"
>  Schema |       Name       | Type  |           Access privileges
> --------+------------------+-------+---------------------------------------
>  public | geometry_columns | table | {postgis=r/landa,landa=arwdRxt/landa}
> (1 row)
> 
> pgis_student=> SELECT count(*) from geometry_columns ;
>  count
> -------
>     21
> (1 row)

QGIS also checks if the user is allowed to use the schema of the
geometry table and can select from the geometry table.

The actual query is:

select * from geometry_columns,pg_class,pg_namespace where relname=f_table_name and f_table_schema=nspname and pg_namespace.oid = pg_class.relnamespace and has_schema_privilege(pg_namespace.nspname,'usage') and has_table_privilege('"'||pg_namespace.nspname||'"."'||pg_class.relname||'"','select') order by f_table_schema,f_table_name


Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502




More information about the Qgis-user mailing list