Hello From: Łukasz Jarych [mailto:jaryszek@xxxxxxxxx] Hi ! I have user : and this user can not login to Database AccessLog. I tried to use: GRANT CONNECT ON DATABASE " AccessLog" TO "Luke"; I see a typo, i.e. a space between the first double quote and the name of the database. Didn’t you get an error at this point? Please provide the result of SELECT datname, datacl FROM pg_database where datname = 'AccessLog'; GRANT CREATE ON SCHEMA PUBLIC TO "Luke"; GRANT USAGE ON SCHEMA public TO "Luke" So expecting result : can modyfy DDL and DML in whole database but user it is not SUPERUSER. Well it depends. In schema public yes, but not in other schemas of the database. If somebody else created, let’s say, a table, user Luke would not have privileges on it, unless you changed the default privileges for schema public and that user. What does this return? SELECT nspname, nspacl FROM pg_namespace WHERE nspname = 'public'; i tried to use: GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "Luke"; I have error: Mmh... What do you get with this? SELECT c.relname, ns.nspname, c.relacl FROM pg_catalog.pg_class c, pg_catalog.pg_namespace ns WHERE ns.oid = c.relnamespace AND c.relname = 't_bladeservers'; Maybe with that information we can try to figure out where the problem is. Please help, How to create USER with all privilages (but no superuser) at once? And how to delete User - drop role "Luke" is saying that there are dependiences for this user... Yes and it says on which objects. You must first revoke those privileges from the user. e.g. REVOKE ALL ON TABLES IN SCHEMA PUBLIC FROM "Luke"; REVOKE ALL ON SCHEMA PUBLIC FROM "Luke"; etc. Regards Charles Please help, Jacek sob., 14 lip 2018 o 12:31 Charles Clavadetscher <clavadetscher@xxxxxxxxxxxx> napisał(a):
|