I'm trying to create a database user (postgres) to access PostGIS data via QGIS.
I've applied the following commands:
GRANT ALL ON SCHEMA PUBLIC TO ene; GRANT SELECT ON ALL TABLES IN SCHEMA public to ene; GRANT ALL PRIVILEGES ON DATABASE "raiateaBD" TO ene;
However, when creating a connection for this user in QGIS, the tables are not available.
Furthermore, a project previously created with data loaded by postgres user (data owner) provokes the handle bad layers window when logged in as ene user.
I added the following, and the user 'ene' still does not have access:
GRANT ALL ON TABLE public.spatial_ref_sys TO ene; GRANT ALL ON TABLE public.geography_columns TO ene; GRANT ALL ON TABLE public.geometry_columns TO ene;
Layer is accessible if I call:
GRANT SELECT ON TABLE public."table_name" TO ene;
However, I'd like to not calling it one by one, but the following command is not doing it:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO ene;
What am I missing?