From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | markir(at)coretech(dot)co(dot)nz, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-08 01:42:40 |
Message-ID: | 200408080142.i781geJ23612@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
Andrew Dunstan wrote:
>
> Oh, yes, multiple quotes strings also cause problems :-(. You have no
> idea how frustrating this was when I was writing initdb, and how hard it
> was to find the problems.
>
> The chdir solution might be best if we can do it, so that we only need
> to quote the destination path.
>
> cheers
>
> andrew
>
> markir(at)coretech(dot)co(dot)nz wrote:
>
> >I tried out Andrew's suggestion, to no avail - none of the archive_commands
> >below work:
> >
> >archive_command = 'copy "%p" "c:/databases/pgarchive/%f"'
> >archive_command = 'copy \"%p\" \"c:/databases/pgarchive/%f\"'
> >archive_command = 'copy \\"%p\\" \\"c:/databases/pgarchive/%f\\"' # desperation
> >...
As I remember the fix was to use this:
archive_command = '"copy "%p" "c:/databases/pgarchive/%f""'
Yes, that is one extra quote at the start and end of the string. Would
you try that?
FYI, port.h has this:
/*
* Win32 needs double quotes at the beginning and end of system()
* strings. If not, it gets confused with multiple quoted strings.
* It also must use double-quotes around the executable name
* and any files used for redirection. Other args can use single-quotes.
*
* See the "Notes" section about quotes at:
* http://home.earthlink.net/~rlively/MANUALS/COMMANDS/C/CMD.HTM
*/
#ifdef WIN32
#define SYSTEMQUOTE "\""
#else
#define SYSTEMQUOTE ""
#endif
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | markir | 2004-08-08 03:24:13 | Re: PITR on Win32 - Archive and Restore |
Previous Message | Andrew Dunstan | 2004-08-08 00:18:46 | Re: PITR on Win32 - Archive and Restore |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-08-08 01:46:24 | Re: dbsize modification to support tablespaces |
Previous Message | Bruce Momjian | 2004-08-08 01:32:03 | Re: Win32 tablespace |