Re: PITR on Win32 - Archive and Restore - Mailing list pgsql-hackers-win32

From Gary Doades
Subject Re: PITR on Win32 - Archive and Restore
Date
Msg-id 4119E9F5.31420.2F87C3C@localhost
Whole thread Raw
In response to Re: PITR on Win32 - Archive and Restore  ("Andrew Dunstan" <andrew@dunslane.net>)
List pgsql-hackers-win32
On 10 Aug 2004 at 22:59, Andrew Dunstan wrote:

>
> C:\msys\1.0\home\adunstan>copytry
> copy "c:\tmp\a b" "c:\tmp\c d"
>         1 file(s) copied.
>
> and with backslashes in the source only I get:
>
> C:\msys\1.0\home\adunstan>copytry
> copy "c:\tmp\a b" "c:/tmp/c d"
>         1 file(s) copied.
>
> go figure ...

According to MSDN: "forward slashes work fine in most cases", the
usual non-commital stuff from MS

One thing is for certain, if you want to use forward slashes (/) then you
will *have* to quote them. The (/) on windows (DOS!) is also a switch
delimiter. If you don't quote paths containing (/) then confusion will be
abundant.

Also if you want to use backslash (\) then you will need to escape it if it
is a "C" string.

Sadly I'm not convinced there is a single solution fits all if you want to
use shell (system()) commands under Windows. It just contains so
much historical baggage (DOS) that you can't be 100% sure that it will
work in all cases. Just because a small set of tests using the copy
command work, I'm not sure other commands will!

If you need stuff that is critical to the operation of Postgres that you
need to work whatever, then I say some small utilities (copy.exe?) that
work in a predicatable way need to be written to ensure this.

For non-critcal stuff documentation is needed to tell the user that they
may need to experiment with command formats.

Cheers,
Gary.


pgsql-hackers-win32 by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Win32 PostgreSQL 8.0 Beta 1 Installer available for download
Next
From: "Mark Cave-Ayland"
Date:
Subject: GUC variables invisible to contrib/ modules under Win32