From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Bug fix in initdb output |
Date: | 2021-03-22 12:47:38 |
Message-ID: | 8c5a6685-2158-774d-22ba-b27e930ec265@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3/22/21 4:36 AM, Juan José Santamaría Flecha wrote:
>
> On Sun, Mar 21, 2021 at 10:28 PM Andrew Dunstan <andrew(at)dunslane(dot)net
> <mailto:andrew(at)dunslane(dot)net>> wrote:
>
>
> Note that the pg_ctl path is quoted, and those quotes are passed
> through
> to cmd.exe. That's what makes it work. It's possibly not worth
> changing
> it now, but if anything that's the change that should have been
> made here.
>
> The OP claimed that the printed command was not working 'as-is', which
> is a valid complaint.
>
> Quoting the command seems like a complete answer for this, as it will
> solve problems with spaces and such for both Windows and Unix-like
> systems.
>
>
Looking into this more closely, we are calling appendShellString() which
is designed to ensure that we call commands via system() cleanly and
securely. But we're not calling system() here. All we're doing is to
print a message. The caret-escaped message is horribly ugly IMNSHO. Can
we see if we can get something less ugly than this?:
Success. You can now start the database server using:
^"bin^\\pg^_ctl^" -D data-C -l logfile start
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2021-03-22 12:50:40 | Re: default result formats setting |
Previous Message | tanghy.fnst@fujitsu.com | 2021-03-22 12:41:41 | RE: Support tab completion for upper character inputs in psql |