Re: PITR on Win32 - Archive and Restore

From: "Gary Doades" <gpd(at)gpdnet(dot)co(dot)uk>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: PITR on Win32 - Archive and Restore
Date: 2004-08-11 08:42:13
Message-ID: 4119E9F5.31420.2F87C3C@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

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.

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Mark Cave-Ayland 2004-08-11 13:02:28 GUC variables invisible to contrib/ modules under Win32
Previous Message Dave Page 2004-08-11 07:45:20 Re: Win32 PostgreSQL 8.0 Beta 1 Installer available for download

Browse pgsql-patches by date

  From Date Subject
Next Message James William Pye 2004-08-11 09:05:16 Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields
Previous Message Martin Münstermann 2004-08-11 07:56:12 Re: 8.0.0beta1: -lpthread missing