From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | "Christian Klemke" <Christian(dot)Klemke(at)t-online(dot)de> |
Cc: | "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-09 13:35:01 |
Message-ID: | 6EE64EF3AB31D5448D0007DD34EEB34101AF29@Herge.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 |
> Guys,
>
> did you notice my earlier CopyFile / CopyFileEx posting (at about
10:20
> German time) ?
> If you want to stick with an external copy executable (which I don't
quite
> understand), just go and write one yourself and provide it for Windows
> users. Leaving aside the neccessary checks, it might be as simple as:
>
> #include <windows.h>
> int main(char* args[]) {
> return CopyFile(args[0],args[1],TRUE);
> }
>
> Adding a proprietary parser for secure handling of quotes (to deal of
> paths
> containing space)s should be simple, I'm sure you have adequate
functions
> in
> your Postgres library. Link it to a file called copy.exe or cp.exe or
> wahtever and add it to the PGBIN directory.
IMO, this is not a solution...the whole point of being able to construct
a command string is to do clever things other than simply copying...such
as redirect through bzip for compression and perhaps a parser to monitor
for errors by duping the stderr handle (just throwing ideas out). Also,
check out all the switches in copy (more for xcopy) and realize the
complexity of a hand-rolled copy.exe zooming upwards.
Merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2004-08-09 13:40:47 | Re: PITR on Win32 - Archive and Restore |
Previous Message | Christian Klemke | 2004-08-09 13:25:51 | Re: PITR on Win32 - Archive and Restore |