Re: PITR on Win32 - Archive and Restore

"Gary Doades" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <4119E9F5.31420.2F87C3C@localhost>
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.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.