Re: Fix a wrong errmsg in AlterRole()

2025-01-09 Thread Nathan Bossart
On Thu, Jan 09, 2025 at 12:27:20PM -0600, Nathan Bossart wrote: > LGTM. I'll plan on committing this shortly. Committed. -- nathan

Re: Fix a wrong errmsg in AlterRole()

2025-01-09 Thread Nathan Bossart
On Thu, Jan 09, 2025 at 10:13:11AM +0800, cca5507 wrote: > I modified the patch according to Tom's suggestion. LGTM. I'll plan on committing this shortly. -- nathan

Re: Fix a wrong errmsg in AlterRole()

2025-01-08 Thread cca5507
Hi, I modified the patch according to Tom's suggestion. -- Regards, ChangAo Chen v2-0001-Fix-a-wrong-errdetail-in-AlterRole.patch Description: Binary data

Re: Fix a wrong errmsg in AlterRole()

2025-01-08 Thread Nathan Bossart
On Wed, Jan 08, 2025 at 10:29:12AM -0500, Tom Lane wrote: > "=?ISO-8859-1?B?Y2NhNTUwNw==?=" writes: >> postgres=> alter group g1 drop user r1; >> ERROR: permission denied to alter role >> DETAIL: Only roles with the ADMIN option on role "g1" may add members. > >> The errmsg is "add members", bu

Re: Fix a wrong errmsg in AlterRole()

2025-01-08 Thread Tom Lane
"=?ISO-8859-1?B?Y2NhNTUwNw==?=" writes: > postgres=> alter group g1 drop user r1; > ERROR: permission denied to alter role > DETAIL: Only roles with the ADMIN option on role "g1" may add members. > The errmsg is "add members", but we are doing a drop. > Here is a small patch to fix it. Hmm. S

Fix a wrong errmsg in AlterRole()

2025-01-08 Thread cca5507
Hi, ``` postgres=# create group g1; CREATE ROLE postgres=# create role r1 in group g1; CREATE ROLE postgres=# set session authorization r1; SET postgres=> alter group g1 drop user r1; ERROR:  permission denied to alter role DETAIL:  Only roles with the ADMIN option on role "g1" may add members. `