pg_dumpall to psql -f NOT working

Lists: pgsql-general
From: Ketema <ketema(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_dumpall to psql -f NOT working
Date: 2007-08-12 16:03:34
Message-ID: 1186934614.439522.251080@19g2000hsx.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hello. I performed a pg_dumpall of my 8.1 db cluster and upgraded to
8.2.4. the dump went fine and the script file appears to be fine. I
have a mixture of UTF8 and SQL_ASCII databases in the dump. However I
am not able to restore my data after the upgrade. I performed from
the command line
psql -f myfile -U postgres postgres

the process starts ok then it fails in the data resotration. What i
see onthe command line is a bunch of invalid commands because of psql
interpreting data as commands.

I had specifically not did insert statements because the documentation
said the copy commands were much faster, now I am regretting it. How
can I get psql to interpret the dumpfile correctly and restore my
data?

Thanks.


From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: Ketema <ketema(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dumpall to psql -f NOT working
Date: 2007-08-13 04:24:10
Message-ID: 162867790708122124g2a341d6cy64ca5599e96d91df@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

2007/8/12, Ketema <ketema(at)gmail(dot)com>:
> Hello. I performed a pg_dumpall of my 8.1 db cluster and upgraded to
> 8.2.4. the dump went fine and the script file appears to be fine. I
> have a mixture of UTF8 and SQL_ASCII databases in the dump. However I
> am not able to restore my data after the upgrade. I performed from
> the command line
> psql -f myfile -U postgres postgres
>
> the process starts ok then it fails in the data resotration. What i
> see onthe command line is a bunch of invalid commands because of psql
> interpreting data as commands.
>
> I had specifically not did insert statements because the documentation
> said the copy commands were much faster, now I am regretting it. How
> can I get psql to interpret the dumpfile correctly and restore my
> data?
>
> Thanks.
>

Hello

try pg_restore myfile

Regards
Pavel Stehule