Re: PITR on Win32 - Archive and Restore
От | Tom Lane |
---|---|
Тема | Re: PITR on Win32 - Archive and Restore |
Дата | |
Msg-id | 15906.1092068850@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: PITR on Win32 - Archive and Restore (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: PITR on Win32 - Archive and Restore
|
Список | pgsql-hackers-win32 |
> 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 */
В списке pgsql-hackers-win32 по дате отправления: