From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | cca5507 <cca5507(at)qq(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fix a wrong errmsg in AlterRole() |
Date: | 2025-01-08 17:39:31 |
Message-ID: | Z364U3jVLD2-pcU_@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 08, 2025 at 10:29:12AM -0500, Tom Lane wrote:
> "=?ISO-8859-1?B?Y2NhNTUwNw==?=" <cca5507(at)qq(dot)com> 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. Seems simpler to just make the errdetail say "... may add or
> drop members."
+1. It looks like this goes back to commit ce6b672 (v16). The error
message was changed in commit de4d456, which is also a v16 change, so
fortunately this has a good chance of back-patching cleanly.
--
nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2025-01-08 17:40:00 | Re: Fwd: Re: A new look at old NFS readdir() problems? |
Previous Message | Sami Imseih | 2025-01-08 17:36:51 | Re: improve DEBUG1 logging of parallel workers for CREATE INDEX? |