Re: Remove default privilege from DB
От | Durumdara |
---|---|
Тема | Re: Remove default privilege from DB |
Дата | |
Msg-id | CAEcMXhnh1sOz10U3-bDFMmCYgmfC6sCQiK4zy-z7oBJMQBmmZQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Remove default privilege from DB (Durumdara <durumdara@gmail.com>) |
Ответы |
Re: Remove default privilege from DB
|
Список | pgsql-general |
Dear Charles!
I did search on backup SQL, and I found 4 lines. All of them needed. I reversed them (Revoke to Grant):
ALTER DEFAULT PRIVILEGES FOR ROLE suser grant ALL ON TYPES to PUBLIC;
ALTER DEFAULT PRIVILEGES FOR ROLE suser grant ALL ON TYPES to suser;
ALTER DEFAULT PRIVILEGES FOR ROLE suser grant ALL ON functions to PUBLIC;
ALTER DEFAULT PRIVILEGES FOR ROLE suser grant ALL ON functions to suser;
And then all lines gone from query, and from "\ddp".
And then all lines gone from query, and from "\ddp".
Ok, it's done.
But the question is: WHY?
When I tried to do same thing but only with one line:
This:
ALTER DEFAULT PRIVILEGES FOR ROLE suser grant ALL ON TYPES to PUBLIC;
Or just this:
ALTER DEFAULT PRIVILEGES FOR ROLE suser grant ALL ON TYPES to suser;
The result was wrong.
I want to know what happened in the background.
I will make "negative" state if I revoke DefACL without prior grant?
I will make "negative" state if I revoke DefACL without prior grant?
Thank you!
dd
В списке pgsql-general по дате отправления: