Lists: | pgsql-hackers-win32 |
---|
From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: Opening stdin/stdout in binary mode on Windows |
Date: | 2005-01-26 18:41:28 |
Message-ID: | 6EE64EF3AB31D5448D0007DD34EEB3412A75E7@Herge.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 |
Tgl wrote:
> I wrote:
> > Can anyone suggest a way that does work to do binary I/O
> > on stdout? What about reading from stdin?
>
> After a bit of googling I came up with the attached patch. I am not
in
> a position to test it, however. Can anyone try it out?
I'll test...is there a quick way to reproduce the error?
Merlin
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
Cc: | pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: Opening stdin/stdout in binary mode on Windows |
Date: | 2005-01-26 18:48:05 |
Message-ID: | 17349.1106765285@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 |
"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> I'll test...is there a quick way to reproduce the error?
Try
pg_dump -Fc mydb >mydb.dump
pg_restore -l mydb.dump
and see if pg_restore complains. I'd suggest checking
all four combinations of writing to stdout or a named file and
having pg_restore read from stdin or a named file.
regards, tom lane
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
Cc: | pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: Opening stdin/stdout in binary mode on Windows |
Date: | 2005-01-26 18:52:57 |
Message-ID: | 17573.1106765577@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 |
Oh, one other thing: the patch is intended to still allow plain text
dumps to be written in text mode ... you might want to check that that
still works as intended.
regards, tom lane