Re: CheckMyDatabase some error messages in two lines.

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CheckMyDatabase some error messages in two lines.
Date: 2024-06-10 02:02:37
Message-ID: ZmZevewQ-8n8EWr_@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 10, 2024 at 08:00:00AM +0800, jian he wrote:
> https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-FORMATTING
> "Don't end a message with a newline."
>
>
> accidentally, I found some error messages in the function
> CheckMyDatabase spread into two lines.
> so i try to consolidate them into one line.

> - 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.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-06-10 02:12:53 Re: CheckMyDatabase some error messages in two lines.
Previous Message Tom Lane 2024-06-10 01:57:54 Re: Remove dependence on integer wrapping