Re: Prevent printing "next step instructions" in initdb and pg_upgrade - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Date
Msg-id CABUevEzPC+DDbEg=1FPL_OdHKLFOBPhuu+Sh9qm_1VY+e1PR1Q@mail.gmail.com
Whole thread Raw
In response to Re: Prevent printing "next step instructions" in initdb and pg_upgrade  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Prevent printing "next step instructions" in initdb and pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Wed, Feb 3, 2021 at 4:21 PM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
>
> On 2021-01-17 14:38, Magnus Hagander wrote:
> > On Thu, Jan 7, 2021 at 11:53 AM Peter Eisentraut
> > <peter.eisentraut@2ndquadrant.com> wrote:
> >>
> >> After pondering this again, I think we can go with initdb
> >> --no-instructions, as in your patch.
> >>
> >> As a minor nitpick, I would leave out the
> >>
> >>       else
> >>           printf(_("\nSuccess.\n"));
> >>
> >> in the --no-instructions case.
> >
> > OK, thanks. I have applied it as such, with that message moved inside
> > the if statement.
>
> It appears that there is an extra blank line in the initdb output before
> "Success" now.

Oops, clearly it does.

That said, the full output is:

"""
Success. You can now start the database server using:

    bin/pg_ctl -D /tmp/data -l logfile start


Success.
"""

Isn't the whole "Success." at the end redundant here, and we should
just end the message after the pg_ctl command? So not just the extra
newline, but the whole thing?

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: jsonb_array_elements_recursive()
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Custom compression methods