public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: jian he <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: CheckMyDatabase some error messages in two lines.
Date: Sun, 09 Jun 2024 22:12:53 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <ZmZevewQ-8n8EWr_@nathan>
References: <CACJufxHHtvaGvV-=LD4OHAG-pM-1hyirKu8iW9+AuaN_NDskfA@mail.gmail.com>
<ZmZevewQ-8n8EWr_@nathan>
Nathan Bossart <[email protected]> writes:
> On Mon, Jun 10, 2024 at 08:00:00AM +0800, jian he wrote:
>> - errdetail("The database was initialized with LC_COLLATE \"%s\", "
>> - " which is not recognized by setlocale().", collate),
>> + errdetail("The database was initialized with LC_COLLATE \"%s\", which is not recognized by setlocale().", collate),
> Both approaches produce the same message. With the existing code, the two
> string literals will be concatenated without newlines. It is probably
> split into two lines to avoid a long line in the source code.
No doubt. People have done it both ways in the past, but I think
currently there's a weak consensus in favor of using one line for
such messages even when it runs past 80 columns, mainly because
that makes it easier to grep the source code for a message text.
But: I don't see too much value in changing this particular instance,
because the line break is in a place where it would not likely cause
you to miss finding the line. You might grep for the first part of
the string or the second part, but probably not for ", which is not".
If the line break were in the middle of a phrase, there'd be more
argument for collapsing it out.
regards, tom lane
view thread (2+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: CheckMyDatabase some error messages in two lines.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox