Fix a wrong errmsg in AlterRole()

From: cca5507 <cca5507(at)qq(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fix a wrong errmsg in AlterRole()
Date: 2025-01-08 08:43:32
Message-ID: tencent_FAA0D00E3514AAF0BBB6322542A6094FEF05@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

```
postgres=# create group g1;
CREATE ROLE
postgres=# create role r1 in group g1;
CREATE ROLE
postgres=# set session authorization r1;
SET
postgres=&gt; alter group g1 drop user r1;
ERROR:&nbsp; permission denied to alter role
DETAIL:&nbsp; 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.

--
Regards,
ChangAo Chen

Attachment Content-Type Size
0001-Fix-a-wrong-errmsg-in-AlterRole.patch application/octet-stream 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-01-08 08:44:29 Re: Conflict detection for update_deleted in logical replication
Previous Message Richard Guo 2025-01-08 08:22:47 Re: Virtual generated columns