From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: improving user.c error messages
Date: Fri, 27 Jan 2023 07:52:36 -0800
Message-ID: <20230127155236.GA2043658@nathanxps13> (raw)
In-Reply-To: <CA+TgmoY-CCk4hp5eArrFM6M8G6xLbbt9e6OLsaZ5dC=MB049XQ@mail.gmail.com>
References: <CA+TgmoYwTFTQR0+qe+_asEvv2wqQL+0JCyexgVy2Ct31+rCb7w@mail.gmail.com>
<CA+TgmobX=LHg_J5aT=0pi9gJy=JdtrUVGAu0zhr-i5v5nNbJDg@mail.gmail.com>
<20230118231749.GA3790025@nathanxps13>
<CA+TgmobVS6OMZMpp9Pus3U680ZY-v5Nao8bmx2ph+UTDPiQqNQ@mail.gmail.com>
<20230126002251.GA1506128@nathanxps13>
<9811affe-6755-2618-001b-46d6218e5463@enterprisedb.com>
<CA+TgmoY-CCk4hp5eArrFM6M8G6xLbbt9e6OLsaZ5dC=MB049XQ@mail.gmail.com>
On Fri, Jan 27, 2023 at 08:31:32AM -0500, Robert Haas wrote:
> I almost hate to bring this up since I'm not sure how far we want to
> go down this rat hole, but what should be our policy about mentioning
> superuser? I don't think we're entirely consistent right now, and I'm
> not sure whether every error message needs to mention that if you were
> the superuser you could do everything. Is that something we should
> mention always, never, or in some set of circumstances?
IMHO superuser should typically only be mentioned when it is the only way
to do something. Since superusers have all privileges, I think logs like
"superuser or privileges of X" are kind of redundant. If Robert has
privileges of X, we wouldn't say "privileges of X or Robert." We'd just
point to X. Ultimately, I feel like mentioning superuser in error messages
usually just makes the message longer without adding any useful
information.
I recognize that this is a bold opinion and that the policy to mention
superuser might need to be more nuanced in practice...
--
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, robertmhaas@gmail.com, peter.eisentraut@enterprisedb.com
Subject: Re: improving user.c error messages
In-Reply-To: <20230127155236.GA2043658@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