Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgres: how to grant an user to add more users to a group

So I know in postgres a group is nothing but a role. But I'll still use groups here.

Say I created a group called my_group as superuser.

I am user user_1.

I want to give user_1 permission to add more users into my_group.

What is the command I need to do as superuser to do that?

like image 315
perryzheng Avatar asked Oct 18 '22 03:10

perryzheng


1 Answers

Use GRANT WITH ADMIN OPTION to do that:

GRANT my_group TO user_1 WITH ADMIN OPTION; 

More info here.

like image 67
Michel Milezzi Avatar answered Oct 20 '22 22:10

Michel Milezzi