From: Nathan Bossart <nathandbossart@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: improving user.c error messages
Date: Thu, 9 Mar 2023 09:58:46 -0800
Message-ID: <20230309175846.GA3626988@nathanxps13> (raw)
In-Reply-To: <abf97f0d-79b4-217c-2ea8-d081648d9a6d@enterprisedb.com>
References: <20230127000936.GA1998073@nathanxps13>
<20230127183119.e5jtyh4g2md57ctb@alvherre.pgsql>
<20230127231507.GA2221340@nathanxps13>
<20230207201009.GA450353@nathanxps13>
<e1bbef97-ed13-f6ad-8d21-b2ebc251394b@enterprisedb.com>
<20230220190210.GA3481922@nathanxps13>
<20230220225852.GA3940888@nathanxps13>
<abf97f0d-79b4-217c-2ea8-d081648d9a6d@enterprisedb.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, peter.eisentraut@enterprisedb.com, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, robertmhaas@gmail.com
Subject: Re: improving user.c error messages
In-Reply-To: <20230309175846.GA3626988@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox