Re: [PATCH] Bug fix in initdb output

2021-03-22 Thread Andrew Dunstan
On 3/22/21 4:36 AM, Juan José Santamaría Flecha wrote: > > On Sun, Mar 21, 2021 at 10:28 PM Andrew Dunstan > 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

Re: [PATCH] Bug fix in initdb output

2021-03-22 Thread Juan José Santamaría Flecha
On Sun, Mar 21, 2021 at 10:28 PM Andrew Dunstan 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

Re: [PATCH] Bug fix in initdb output

2021-03-21 Thread Andrew Dunstan
On 3/2/21 9:32 AM, Alvaro Herrera wrote: > On 2021-Mar-02, Nitin Jadhav wrote: > >>> FWIW, I don't think that it is a good idea to come back to this >>> decision for *nix platforms, so I would let it as-is, and use >>> relative paths if initdb is called using a relative path. >> The command to

Re: [PATCH] Bug fix in initdb output

2021-03-02 Thread Alvaro Herrera
On 2021-Mar-02, Nitin Jadhav wrote: > > FWIW, I don't think that it is a good idea to come back to this > > decision for *nix platforms, so I would let it as-is, and use > > relative paths if initdb is called using a relative path. > > The command to be displayed either in absolute path or

Re: [PATCH] Bug fix in initdb output

2021-03-02 Thread Nitin Jadhav
> > FWIW, I don't think that it is a good idea to come back to this > decision for *nix platforms, so I would let it as-is, and use relative > paths if initdb is called using a relative path. The command to be displayed either in absolute path or relative path depends on the way the user is

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Michael Paquier
On Tue, Mar 02, 2021 at 01:28:57AM +0100, Juan José Santamaría Flecha wrote: > For me it is a +1 for the change to absolute. Let's see if more people want > to weigh in on the matter. FWIW, I don't think that it is a good idea to come back to this decision for *nix platforms, so I would let it

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 10:18 PM Alvaro Herrera wrote: > On 2021-Mar-01, Juan José Santamaría Flecha wrote: > > > Uhm, now that you point it out, an absolute path would make the message > > more consistent and reusable. > > Well. This code was introduced in a00c58314745, with discussion at > >

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Alvaro Herrera
On 2021-Mar-01, Juan José Santamaría Flecha wrote: > Uhm, now that you point it out, an absolute path would make the message > more consistent and reusable. Well. This code was introduced in a00c58314745, with discussion at

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 9:09 PM Alvaro Herrera wrote: > On 2021-Mar-01, Juan José Santamaría Flecha wrote: > > > On Mon, Mar 1, 2021 at 7:50 PM Alvaro Herrera > > wrote: > > > > Ah, so another way to fix it would be to make the path to pg_ctl be > > > absolute? > > > > Yes, that's right. If you

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Alvaro Herrera
On 2021-Mar-01, Juan José Santamaría Flecha wrote: > On Mon, Mar 1, 2021 at 7:50 PM Alvaro Herrera > wrote: > > Ah, so another way to fix it would be to make the path to pg_ctl be > > absolute? > > Yes, that's right. If you call initdb with an absolute path you won't see a > problem. So, is

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 7:50 PM Alvaro Herrera wrote: > On 2021-Mar-01, Juan José Santamaría Flecha wrote: > > > This is not a problem with the APi, but the shell. e.g. when using a CMD: > > > > - This works: > > c:\>c:\Windows\System32\notepad.exe > > c:\>c:/Windows/System32/notepad.exe > >

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Alvaro Herrera
On 2021-Mar-01, Juan José Santamaría Flecha wrote: > This is not a problem with the APi, but the shell. e.g. when using a CMD: > > - This works: > c:\>c:\Windows\System32\notepad.exe > c:\>c:/Windows/System32/notepad.exe > c:\>/Windows/System32/notepad.exe > > - This doesn't: >

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
El lun., 1 mar. 2021 19:16, Alvaro Herrera escribió: > > I don't get it. I thought the windows API accepted both forward slashes > and backslashes as path separators. Did you try the command and see it > fail? > This is not a problem with the APi, but the shell. e.g. when using a CMD: - This

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Alvaro Herrera
On 2021-Mar-01, Juan José Santamaría Flecha wrote: > On Mon, Mar 1, 2021 at 5:52 AM Nitin Jadhav > wrote: > > > > >> Please share your thoughts on this. If we go ahead with this change, > > then we need to back-patch. I would be happy to create those patches. > > A full path works, even with

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 5:52 AM Nitin Jadhav wrote: > >> Please share your thoughts on this. If we go ahead with this change, > then we need to back-patch. I would be happy to create those patches. > A full path works, even with the slashes. The commiter will take care of back-patching, if