| From: | Ivan <Ivan-Sun1(at)mail(dot)ru> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: pg_dumpall bug & feature request |
| Date: | 2005-11-03 14:33:05 |
| Message-ID: | 153662571.20051103173305@mail.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hello Alvaro,
Thursday, November 3, 2005, 3:28:41 PM, you wrote:
AH> Ivan wrote:
AH> Hi,
>> Perhaps you missed my previous message.
>> pg_dumpall has not -f command line option
>> to specify output file - it always send output
>> to standart output. But there is an issue with
>> it in Windows (I described it earlier) - function's
>> line endings are changed from 0D 0A to 0D 0D 0A.
AH> Hmm, what do you need that for? Why don't you directly restore the
AH> binary dump to a database by using option -d?
I don't need to restore binary dump. I need to make a dump of the
whole database cluster to plain sql file (what pg_dumpall does).
So I have to redirect pg_dumpall's output to a file
pg_dump [options] > cluster_dump.sql
When I do it on Windows, it creates cluster_dump.sql file
BUT in that file all sql and plpgsql function bodies are corrupted! -
each line in the body ends with 0D 0D 0A sequence instead of 0D 0A -
therefor functions after restoring looks like:
CREATE OR REPLACE FUNCTION "foo"()
RETURNS bar AS
$$
select * from "bar"
where bla-bla
order by bla-bla;
$$
LANGUAGE 'sql' VOLATILE;
instead of
CREATE OR REPLACE FUNCTION "foo"()
RETURNS bar AS
$$
select * from "bar"
where bla-bla
order by bla-bla;
$$
LANGUAGE 'sql' VOLATILE;
- extra blank lines are added.
So it would be great if the output redirection ">" will be workaround
for example the same way like in pg_dump it is done - via -f file
option.
Thank you for support.
--
Best regards,
Ivan mailto:Ivan-Sun1(at)mail(dot)ru
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2005-11-03 15:03:16 | Re: Failed CLUSTER seems to leave files behind |
| Previous Message | Alvaro Herrera | 2005-11-03 12:28:41 | Re: pg_dumpall bug & feature request |