From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-10 18:03:32 |
Message-ID: | 200408101803.i7AI3Wa19241@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
I have gotten confused by this. Does COPY work with quoted paths only
if we use forward slashes, or was this fix just for the slash issue and
not spaces?
---------------------------------------------------------------------------
Tom Lane wrote:
> > Okay, I'll change %p to emit \ on Windows, and we'll see where that
> > takes us.
>
> I've applied the attached patch, in case anyone is in a big hurry to try
> it.
>
> regards, tom lane
>
>
> Index: src/backend/access/transam/xlog.c
> ===================================================================
> RCS file: /cvsroot/pgsql-server/src/backend/access/transam/xlog.c,v
> retrieving revision 1.157
> diff -c -r1.157 xlog.c
> *** src/backend/access/transam/xlog.c 8 Aug 2004 03:22:08 -0000 1.157
> --- src/backend/access/transam/xlog.c 9 Aug 2004 16:23:51 -0000
> ***************
> *** 1962,1968 ****
> --- 1962,1978 ----
> /* %p: full path of target file */
> sp++;
> StrNCpy(dp, xlogpath, endp-dp);
> + #ifndef WIN32
> dp += strlen(dp);
> + #else
> + /* On Windows, change / to \ in the substituted path */
> + while (*dp)
> + {
> + if (*dp == '/')
> + *dp = '\\';
> + dp++;
> + }
> + #endif
> break;
> case 'f':
> /* %f: filename of desired file */
> Index: src/backend/postmaster/pgarch.c
> ===================================================================
> RCS file: /cvsroot/pgsql-server/src/backend/postmaster/pgarch.c,v
> retrieving revision 1.5
> diff -c -r1.5 pgarch.c
> *** src/backend/postmaster/pgarch.c 5 Aug 2004 23:32:10 -0000 1.5
> --- src/backend/postmaster/pgarch.c 9 Aug 2004 16:23:51 -0000
> ***************
> *** 436,442 ****
> --- 436,452 ----
> /* %p: full path of source file */
> sp++;
> StrNCpy(dp, pathname, endp-dp);
> + #ifndef WIN32
> dp += strlen(dp);
> + #else
> + /* On Windows, change / to \ in the substituted path */
> + while (*dp)
> + {
> + if (*dp == '/')
> + *dp = '\\';
> + dp++;
> + }
> + #endif
> break;
> case 'f':
> /* %f: filename of source file */
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
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 | Tom Lane | 2004-08-10 18:11:51 | Re: PITR on Win32 - Archive and Restore |
Previous Message | Rodrigo Moreno | 2004-08-10 17:08:19 | InitDB Failure on install |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-08-10 18:11:51 | Re: PITR on Win32 - Archive and Restore |
Previous Message | Fabien COELHO | 2004-08-10 15:00:50 | Re: Bug: century/millenium still broken |