Skip to main content
deleted 1 character in body
Source Link

This will probably do what you want:

revoke create on schema public¹ from public²; 

Note that the public² does not mean the schema public¹, but a group representation of all users of the database. So when you try to revoke your user from creating tables nothing happens because it probably does not have this permissions at start(except if you give it), but the group public² that your user belongs, is with this access by default, as you are talking about the schema public ;-) .- That's the confusiondefault behavior for schema public.

Now you can give the create privilege for specific users:

grant create on schema public to specificuser; 

This will probably do what you want:

revoke create on schema public¹ from public²; 

Note that the public² does not mean the schema public¹, but a group representation of all users of the database. So when you try to revoke your user from creating tables nothing happens because it probably does not have this permissions at start(except if you give it), but the group public² that your user belongs, is with this access by default, as you are talking about the schema public ;-) . That's the confusion.

Now you can give the create privilege for specific users:

grant create on schema public to specificuser; 

This will probably do what you want:

revoke create on schema public¹ from public²; 

Note that the public² does not mean the schema public¹, but a group representation of all users of the database. So when you try to revoke your user from creating tables nothing happens because it probably does not have this permissions at start(except if you give it), but the group public² that your user belongs, is with this access by default - That's the default behavior for schema public.

Now you can give the create privilege for specific users:

grant create on schema public to specificuser; 
Source Link

This will probably do what you want:

revoke create on schema public¹ from public²; 

Note that the public² does not mean the schema public¹, but a group representation of all users of the database. So when you try to revoke your user from creating tables nothing happens because it probably does not have this permissions at start(except if you give it), but the group public² that your user belongs, is with this access by default, as you are talking about the schema public ;-) . That's the confusion.

Now you can give the create privilege for specific users:

grant create on schema public to specificuser;