Обсуждение: Re: PITR on Win32 - Archive and Restore

Поиск
Список
Период
Сортировка

Re: PITR on Win32 - Archive and Restore

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-hackers-win32-owner@postgresql.org
> [mailto:pgsql-hackers-win32-owner@postgresql.org] On Behalf
> Of Merlin Moncure
> Sent: 09 August 2004 13:12
> To: markir@coretech.co.nz
> Cc: pgsql-hackers-win32@postgresql.org
> Subject: Re: [pgsql-hackers-win32] PITR on Win32 - Archive and Restore
>
> I tried using copy for a while and gave up...it never got the
> slashes right.  I then replaced with cp that comes with mingw
> and that works fine.

We can't really ship that though as it's GNU...

Regards, Dave.

Re: PITR on Win32 - Archive and Restore

От
Andreas Pflug
Дата:
Dave Page wrote:
>
>
>
>>-----Original Message-----
>>From: pgsql-hackers-win32-owner@postgresql.org
>>[mailto:pgsql-hackers-win32-owner@postgresql.org] On Behalf
>>Of Merlin Moncure
>>Sent: 09 August 2004 13:12
>>To: markir@coretech.co.nz
>>Cc: pgsql-hackers-win32@postgresql.org
>>Subject: Re: [pgsql-hackers-win32] PITR on Win32 - Archive and Restore
>>
>>I tried using copy for a while and gave up...it never got the
>>slashes right.  I then replaced with cp that comes with mingw
>>and that works fine.
>
>
> We can't really ship that though as it's GNU...

Shell commands usage from programs has always been a PITA in win32, and
it will probably remain. We should replace all such occurrences by /port
stuff to get this fixed finally.

Regards,
Andreas

Re: PITR on Win32 - Archive and Restore

От
Tom Lane
Дата:
Andreas Pflug <pgadmin@pse-consulting.de> writes:
> Shell commands usage from programs has always been a PITA in win32, and
> it will probably remain. We should replace all such occurrences by /port
> stuff to get this fixed finally.

The fact that we are invoking a shell command here is not a bug, it's
a feature.  cp is not the only possible command one might want to use,
nor even the most likely command --- it's just the simplest case that
could possibly be useful.  I fully expect that people will be using some
sort of shell script in production.

            regards, tom lane

Re: PITR on Win32 - Archive and Restore

От
Tom Lane
Дата:
Andreas Pflug <pgadmin@pse-consulting.de> writes:
> This means that all win32 rules on filenames apply on all those calls,
> i.e. directory backslashes only, and proper quoting (which might be tool
> dependent in some cases).

That's what I've asked repeatedly, and not gotten any answers about.
Is converting / to \ sufficient, or would there still be quoting
problems?

            regards, tom lane

Re: PITR on Win32 - Archive and Restore

От
Andreas Pflug
Дата:
Tom Lane wrote:
>
>
> The fact that we are invoking a shell command here is not a bug, it's
> a feature.  cp is not the only possible command one might want to use,
> nor even the most likely command --- it's just the simplest case that
> could possibly be useful.  I fully expect that people will be using some
> sort of shell script in production.

This means that all win32 rules on filenames apply on all those calls,
i.e. directory backslashes only, and proper quoting (which might be tool
dependent in some cases).

ifdef time...

Regards,
Andreas