Re: improving user.c error messages
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2023-03-09T17:58:46Z
Lists: pgsql-hackers
On Thu, Mar 09, 2023 at 10:55:54AM +0100, Peter Eisentraut wrote: > On 20.02.23 23:58, Nathan Bossart wrote: >> For now, I've reworded these as "must inherit privileges of". > > I don't have a good mental model of all this role inheritance, personally, > but I fear that this change makes the messages more jargony and less clear. > Maybe the original wording was good enough. I'm fine with that. > "admin option" is sort of a natural language term, I think, so we don't need > to parametrize it as "%s option". Also, there are no other "options" in > this context, I think. v16 introduces the INHERIT and SET options. I don't have a strong opinion about parameterizing it, though. My intent was to consistently capitalize all the attributes and options. > A general thought: It seems we currently don't have any error messages that > address the user like "You must do this". Do we want to go there? Should we > try for a more impersonal wording like > > "You must have the %s attribute to create roles." > > "Current user must have the %s attribute to create roles." > > "%s attribute is required to create roles." I think I like the last option the most. In general, I agree with trying to avoid the second-person phrasing. > By the way, I'm not sure what the separation between 0001 and 0002 is > supposed to be. I'll combine them. I first started with user.c only, but we kept finding new messages to improve. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve several permission-related error messages.
- de4d456b406b 16.0 landed
-
Integrate superuser check into has_rolreplication()
- 442f8700656b 16.0 landed
-
Small code simplification
- 3b7cd8c690f2 16.0 landed
-
Adjust interaction of CREATEROLE with role properties.
- f1358ca52dd7 16.0 landed
-
Add new GUC reserved_connections.
- 6e2775e4d4e4 16.0 landed
-
Rename ReservedBackends variable to SuperuserReservedConnections.
- fe00fec1f5d7 16.0 landed
-
Update docs and error message for superuser_reserved_connections.
- 6c1d5ba48678 16.0 landed
-
Add new GUC createrole_self_grant.
- e5b8a4c098ad 16.0 cited
-
Restrict the privileges of CREATEROLE users.
- cf5eb37c5ee0 16.0 cited
-
Add a SET option to the GRANT command.
- 3d14e171e9e2 16.0 cited