Hello Jacek From: Łukasz Jarych [mailto:jaryszek@xxxxxxxxx] Thank you very much Charles! Awesome knowledge, thank you! I will test it and let you know if it is working like a charm (i am on vacation now and without access to postgresql). I am wondering with one thing:
This will allow to create, drop, isnert and delete? All ddl and dml commands? Or should i use GRANT ALL ON SCHEMA PUBLIC TO jaryszek ? No. There are 2 privileges that you can grant on a schema: USAGE: Allows to use objects in that schema. CREATE: Allows to create and destroy objects in that schema. None of those says anything about which privileges users have within the schema. You need to define additionally privileges (e.g. select, insert, update, delete) on the objects within the schema. So in order to get access to a table public.test a user must have: USAGE on schema public AND SELECT (or whatever) on the table itself. If any of those is missing the user will not be able to access the table. GRANT ALL is generally a bad idea, althought on schemas there is not much you can do wrong. It doesn’t hurt if you add USAGE (which would be included in ALL along CREATE) for user jaryszek, but it is not necessary, because public (= any user) was only revoked CREATE (s. example in last mail). That means public still has USAGE on schema public and obviously you are on one of “any user”. I hope I could explain that somehow. If you still have questions just get back on the list. Bye Charles Best, Jacek sob., 14 lip 2018 o 08:23 Charles Clavadetscher <clavadetscher@xxxxxxxxxxxx> napisał(a):
|