[Qgis-developer] login to postgres/postgis from QGIS
Yves Jacolin
yjacolin at free.fr
Fri Feb 27 00:29:37 PST 2015
On Friday, February 27, 2015 8:08:13 Otto Dassau wrote:
> Hi,
>
> I cannot login to a postgis database with QGIS as a normal user 'testuser'.
> But I can login with psql and using pgadmin3.
>
> CREATE ROLE testuser LOGIN
> NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
>
> I get following error in QGIS:
>
> CET ERROR: function postgis_version() does not exist at character 8
> CET HINT: No function matches the given name and argument types. You might
> need to add explicit type casts.
> CET STATEMENT: SELECT postgis_version()
>
> If I create another user as SUPERUSER I can login without problems. What
> could be the reason for this?
>
> Thanks a lot
Otto,
Some tips:
Check testuser can access to the public schema and geometry_column,
geography_column.
Something like:
GRANT ALL TO SCHEMA public to public;
GRANT ALL ON ALL TABLES IN SCHEMA public TO public;
public role is a specific role which contains all user.
Y.
More information about the Qgis-developer
mailing list