2

I've created user profiles for my teammates to connect to my postGIS database with QGIS.

with my own user account I am able to successfully connect to my postGIS database on AWS RDS using QGIS 2.18.

user creation SQL:

CREATE USER foobar WITH
    LOGIN
    NOSUPERUSER
    NOCREATEDB
    NOCREATEROLE
    INHERIT
    NOREPLICATION
    CONNECTION LIMIT -1
    PASSWORD 'xxxxxx';

And granted permissions:

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA test TO foobar;

Am I missing a step? When I connect in QGIS, I only see an empty public schema. enter image description here

EDIT: In addition to the accepted answer, one can also change the default privileges so newly created tables are shown automatically in QGIS:

ALTER DEFAULT PRIVILEGES IN SCHEMA test GRANT ALL ON TABLES to foobar;
5

You also need to grant usage on your schema:

GRANT USAGE ON SCHEMA test TO foobar;
  • If for some reason PostGIS extension has been installed under different schema than the default public then the user also needs access to that schema. For example, if the PostGIS extension has been installed under the schema postgis then one has to run the query: GRANT USAGE ON SCHEMA postgis TO foobar;. I am not sure, why one would use different than the public schema for the PostGIS extension but probably there can be reasons. – Orienteerix Jun 7 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.